if

1 次查看(过去 30 天)
nsbd
nsbd 2011-5-7
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 ?

采纳的回答

Walter Roberson
Walter Roberson 2011-5-7
ismember(F,[100,300,600])
  2 个评论
nsbd
nsbd 2011-5-7
thank you very much
nsbd
nsbd 2011-5-7
:)

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Resizing and Reshaping Matrices 的更多信息

标签

产品

Community Treasure Hunt

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

Start Hunting!

Translated by