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 comentarios

Matt J
Matt J el 27 de Sept. de 2019
You should get a result. I do.
Stephen23
Stephen23 el 28 de Sept. de 2019
>> if (all(ismember(result_var,[ 1 7 10]))||all(ismember(result_var, [2 7 10])))
disp('hei')
end
hei
>>

Respuestas (0)

La pregunta está cerrada.

Etiquetas

Preguntada:

el 27 de Sept. de 2019

Cerrada:

el 20 de Ag. de 2021

Community Treasure Hunt

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

Start Hunting!

Translated by