- Read about unique() function
- For each unique value try finding the number of times it occurs using len() and find() functions
How to identify that you have multiple values in a vector?
6 views (last 30 days)
So I'm making a sort of- Yatzy-esque thing on MATLAB and I need help finding if a vector has multiple values and whether they are sequential in said vector.
[ 1 2 1 4 3 1]
Like how I be able to find that the vector has three one's and that they have numbers that go in a sequential order? Any nudge in the right direction would be appreciated.
I understand you would use functions such as find, but I'm still confused how it would be used. Sorry for being a beginner.