Candace
Posts:
13
Registered:
10/20/12
|
|
Re: matlab version and "for" loops
Posted:
Jan 22, 2013 2:52 PM
|
|
"Bruno Luong" <b.luong@fogale.findmycountry> wrote in message <kdlt80$st0$1@newscl01ah.mathworks.com>... > Here is a simple example, feel free to adapt to your case: > > GazeType={'Delete' 'Keep' 'Fruit' 'Delete' 'Benzen'} > Picture={'Image' 'Picasso' 'Matisse' 'Dali' 'You'} > Data = 1:5 > > delete_b = strcmp(GazeType,'Delete') & ~strcmp(Picture,'Image'); > Data(delete) = [] > > % Bruno
This is much faster-- thanks for the tip!
|
|