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.
>> 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