if

2 Ansichten (letzte 30 Tage)
nsbd
nsbd am 7 Mai 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 ?

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 7 Mai 2011
ismember(F,[100,300,600])
  2 Kommentare
nsbd
nsbd am 7 Mai 2011
thank you very much
nsbd
nsbd am 7 Mai 2011
:)

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Resizing and Reshaping Matrices finden Sie in Help Center und File Exchange

Tags

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by