Return ith calling argument.
Version 1.0.0.0 (1.33 KB) by
Phillip M. Feldman
pick(i, r_0, r_1, ...) returns r_i.
pick(i, r_0, r_1, ...) returns r_i. Thus, if i==0, pick() returns the
second calling argument (r_0); if i==1, pick() returns the third calling argument (r_1); and so on. If there is no argument corresponding to i, pick() returns an empty matrix. If pick() is called with fewer than two calling arguments, pick() throws an error.
For example, the following returns z= x if flag equals 0 or false and z= y if flag equals 1 or true:
z= pick(flag, x, y);
Cite As
Phillip M. Feldman (2026). Return ith calling argument. (https://in.mathworks.com/matlabcentral/fileexchange/24030-return-ith-calling-argument), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2009a
Compatible with any release
Platform Compatibility
Windows macOS LinuxCategories
Find more on Numeric Types in Help Center and MATLAB Answers
Tags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.0.0.0 |
