test function for array MATLAB
test function for array MATLAB
(OP)
i all.
i would want to know if exist a matlab function that test array elements if are equal.
thanks
i would want to know if exist a matlab function that test array elements if are equal.
thanks





RE: test function for array MATLAB
RE: test function for array MATLAB
i explain; for example i have this array [1 2 1 3 4] and i test it if there are equal elements.
in this case there are 2 elements 1 and then i do anything.
all that i must do without loop statements.
isequal its good???
RE: test function for array MATLAB
RE: test function for array MATLAB
so i do this test as:
x=[1 2 3 1 1 4];
if (unique(x)~=x)
error('There are equal elements');
end
its good???