Mapping two matrices
Mostra commenti meno recenti
Hi! My question is :
I have two n x n matrices one being pressure levels(SPL) and the other one being the frequency (f) of each and every SPL. Their indices are of course the same since the matrices are identical in shape. I need to sort the f matrix and put it into a 1D vector form and I want the SPL matrix to follow.
How could I do this? Thanks
Risposta accettata
Più risposte (1)
Andrei Bobrov
il 9 Set 2011
out = [f(:) SPL(:)]
with sort
out = sortrows([f(:) SPL(:)],1);
1 Commento
Bilen Oytun Peksel
il 9 Set 2011
Categorie
Scopri di più su Shifting and Sorting 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!