if

3 views (last 30 days)
nsbd
nsbd on 7 May 2011
Hi all,
"
for i=1:1000;
%event
F=(i+1);
if F == 100 300 ; % ????????????????
disp('hi all');
end
end
"
F=100 or 300 or 600 ..... disp('all') how I do ?

Accepted Answer

Walter Roberson
Walter Roberson on 7 May 2011
ismember(F,[100,300,600])
  2 Comments
nsbd
nsbd on 7 May 2011
thank you very much
nsbd
nsbd on 7 May 2011
:)

Sign in to comment.

More Answers (0)

Categories

Find more on Resizing and Reshaping Matrices in Help Center and File Exchange

Tags

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!