q matrices element matching
Mostra commenti meno recenti
i have a matrix like
A=[1 2 3 4 5;
1 2 3 4 6
1 3 4 5 8];
i want a output like X=[1 2 3 4 0]
i.e. i need the common element in the particular coloumn if there is no particular coloum result must b zero
Risposta accettata
Più risposte (1)
Steven Lord
il 28 Ago 2019
0 voti
I suspect this is a homework assignment so I'm only going to give a hint. You want the most common element as long as it appears multiple times? The mode function may be of use to you.
Categorie
Scopri di più su Resizing and Reshaping Matrices 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!