How to pull out rows with a unique value in a specified column?
Show older comments
I have a matrix variable called 'summed' which is 1330 x 2.
I want to pull out every row of 'summed' that has a unique value in the second column, and store these in a new variable, called 'uniqueVals'
I tried the following line of code:
uniqueVals = summed(:,2) == unique;
Which didn't work, and I am unsure how I should go about doing this?
1 Comment
per isakson
on 24 Oct 2017
- Are summed floating point numbers?
- Which release of Matlab do you use?
Accepted Answer
More Answers (1)
Louisa Thomas
on 24 Oct 2017
0 votes
Categories
Find more on Solver Outputs and Iterative Display in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!