Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

using or (||) with ismember function

1 Ansicht (letzte 30 Tage)
Muazma Ali
Muazma Ali am 27 Sep. 2019
Geschlossen: MATLAB Answer Bot am 20 Aug. 2021
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 Kommentare
Matt J
Matt J am 27 Sep. 2019
You should get a result. I do.
Stephen23
Stephen23 am 28 Sep. 2019
>> if (all(ismember(result_var,[ 1 7 10]))||all(ismember(result_var, [2 7 10])))
disp('hei')
end
hei
>>

Antworten (0)

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by