Filter löschen
Filter löschen

Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

what happens if store the indexes of one matrix into other?

1 Ansicht (letzte 30 Tage)
Iram Shahzadi
Iram Shahzadi am 13 Sep. 2018
Geschlossen: MATLAB Answer Bot am 20 Aug. 2021
I had data matrix "kdata" which is 4 D with the size of 512*100*20*11. If I sort another data matrix "Y" and store its indexes in the second dimension of the data matrix what happens? I am using following code
for ii=1:nt
tmp1=kdata(:,:,:,ii);
[~,index]=sort(y(:,ii),'descend');
tmp1=tmp1(:,index,:);
end
  2 Kommentare
Stephen23
Stephen23 am 13 Sep. 2018
" If I sort another data matrix "Y" and store its indexes in the second dimension of the data matrix..."
You are not "storing" the indices at all, but using them to rearrange the order of the second dimension of tmp1.
"...what happens?"
Try it and find out.
Iram Shahzadi
Iram Shahzadi am 13 Sep. 2018
Thank you @Stephen Cobeldick. I got it

Antworten (0)

Diese Frage ist geschlossen.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by