Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TugboatEng 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
Joined
Dec 3, 2005
Messages
5
Location
IT
i all.

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

thanks
 
How about isequal(element1, element1)?
 
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

Back
Top