I am trying to determine if all of the numbers in "x" is non-zero values:
x = [1 1 0]% 1:
if x ~= [0 0 0] disp('x is not zeros')end% 2:
if all(x ~= 0) disp('x is not zeros')end
but the output is saying the x is zeros.
what mistake did I make?
Best Answer