×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

test function for array MATLAB

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

RE: test function for array MATLAB

How about isequal(element1, element1)?

RE: test function for array MATLAB

(OP)
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???

RE: test function for array MATLAB

help unique

RE: test function for array MATLAB

(OP)
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???

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources