Comparing 2 columns of a matrix
Mostra commenti meno recenti
I want to compare 2 columns of my matrix as shown below:

For example, I have the number 4 in the first column occurring thrice. I need to compare it's corresponding values in column 2 and obtain the minimum value among them. I then need to store that value in another matrix.
Could someone suggest me a way to get this desired result.
Thanks and regards
Risposta accettata
Più risposte (1)
Image Analyst
il 23 Feb 2019
0 voti
You can do this easily with unique() and histogram() or histcounts(). Since you didn't include your data in a way that's easy for us to code up, I assume you'd prefer to do it yourself, so give it a try. If you run into problems, attach your data and explain the problem(s).
1 Commento
Gautami Golani
il 23 Feb 2019
Categorie
Scopri di più su Logical in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
