The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: How to find a unique value in a matrix using matlab
Replies: 5   Last Post: Oct 8, 2013 3:03 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
gan kelly

Posts: 2
Registered: 10/7/13
How to find a unique value in a matrix using matlab
Posted: Oct 7, 2013 8:13 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hi, everyone.
Let's say I have following (3x3)matrix A:

0 1 3
0 0 3
0 0 0

My question is how to find out the unique value in that matrix by using matlab? In this case, the result should be 1. I have tried used the


but it returned a vector {0;1;3} is not what I want.

I much appreciate if you guys can help me solve this problem. Thank you!

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.