How to print most repeated Value in MATLAB
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
I have the following array, I want to print the value which is repeated mostly in array.
How can i do that in MATLAB
0 Commenti
Risposte (2)
Steven Lord
il 17 Dic 2022
x = randi(5, 6, 6)
mostCommonInColumns = mode(x)
mostCommonInMatrix = mode(x, 'all')
0 Commenti
KSSV
il 17 Dic 2022
a = [1 2 2 2 3 3 4 4 4] ;
[c,ia,ib] = unique(a);
C = accumarray(ib,1) ;
[c' C]
3 Commenti
Voss
il 17 Dic 2022
@Med Future: The dataset you have attached contains 492 unique values. That is, there are no repeated values.
load reprctedvalue
numel(clusters1)
numel(unique(clusters1))
Vedere anche
Categorie
Scopri di più su Matrix Indexing in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!