필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

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

조회 수: 1 (최근 30일)
Iram Shahzadi
Iram Shahzadi 2018년 9월 13일
마감: MATLAB Answer Bot 2021년 8월 20일
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
Stephen23
Stephen23 2018년 9월 13일
" 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 2018년 9월 13일
Thank you @Stephen Cobeldick. I got it

답변 (0개)

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by