Info

此问题已关闭。 请重新打开它进行编辑或回答。

using or (||) with ismember function

1 次查看(过去 30 天)
Muazma Ali
Muazma Ali 2019-9-27
关闭: MATLAB Answer Bot 2021-8-20
result_var=[ 1 7 10];
if (all(ismember(result_var,[ 1 7 10]))||all(ismember(result_var, [2 7 10])))
disp('hei')
end
% i dont get any result when I execute these statements on the Matlab command window..
  2 个评论
Matt J
Matt J 2019-9-27
You should get a result. I do.
Stephen23
Stephen23 2019-9-28
>> if (all(ismember(result_var,[ 1 7 10]))||all(ismember(result_var, [2 7 10])))
disp('hei')
end
hei
>>

回答(0 个)

标签

Community Treasure Hunt

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

Start Hunting!

Translated by