Dec 3, 2005 #1 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
Dec 5, 2005 #2 denno1 Computer Joined Mar 3, 2005 Messages 7 Location US How about isequal(element1, element1)? Upvote 0 Downvote
Dec 5, 2005 Thread starter #3 ghiotto86 Computer Joined Dec 3, 2005 Messages 5 Location IT 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??? Upvote 0 Downvote
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???
Dec 5, 2005 #4 VisiGoth Electrical Joined Jul 20, 2005 Messages 260 Location US help unique Upvote 0 Downvote
Dec 5, 2005 Thread starter #5 ghiotto86 Computer Joined Dec 3, 2005 Messages 5 Location IT 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??? Upvote 0 Downvote
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???