using or (||) with ismember function

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 件)

この質問は閉じられています。

タグ

質問済み:

2019 年 9 月 27 日

閉鎖済み:

2021 年 8 月 20 日

Community Treasure Hunt

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

Start Hunting!

Translated by