Be the first to rate this file! 0 Downloads (last 30 days) File Size: 1.33 KB File ID: #24030

Return ith calling argument.

by Phillip M. Feldman

 

07 May 2009

pick(i, r_0, r_1, ...) returns r_i.

| Watch this File

File Information
Description

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);

MATLAB release MATLAB 7.8 (R2009a)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
argument selection Phillip M. Feldman 08 May 2009 10:10:46
conditional expression Phillip M. Feldman 08 May 2009 10:10:46

Contact us at files@mathworks.com