Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

test function for array MATLAB

Status
Not open for further replies.

ghiotto86

Computer
Dec 3, 2005
5
i all.

i would want to know if exist a matlab function that test array elements if are equal.

thanks
 
Replies continue below

Recommended for you

thank you for answer.
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???
 
wow visigoth thank you so much.

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???
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor