Hi, I have row and column vectors x,y respectivily
assume N=3 , x={0.587 0.344 .712} , y={ 0.987 0.952 0.689 } after that the ascending order of x&y as shown Bx=sort(x); By=sort(y); the result for that
Bx={0.344 0.587 0.712}, By={0.689 0.952 0.987}
My question here >>>How taking the index of Bx&By from x&y to generate row and column permutation vectors to obtain the result as mm={2 1 3},and nn={3 2 1 }

 채택된 답변

KALYAN ACHARJYA
KALYAN ACHARJYA 2019년 5월 4일

0 개 추천

[c1,mn]=ismember(x,Bx);
[c2,nn]=ismember(y,By);

댓글 수: 3

huda ali
huda ali 2019년 5월 4일
Thank you but I want to know how to get the values mm ,i mean followed the values of Bx ,x and then obtain the values of mm . know how gets that ??
KALYAN ACHARJYA
KALYAN ACHARJYA 2019년 5월 4일
disp(mn);
huda ali
huda ali 2019년 5월 4일
thanks soo much , the values of mm are available in reference i need how get these values

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Image Analyst
Image Analyst 2019년 5월 4일

1 개 추천

Try
[Bx, mm] = sort(x, 'ascend');
[By, nn] = sort(y, 'ascend');

댓글 수: 3

huda ali
huda ali 2019년 5월 4일
Thank you and finally the solution has been
Image Analyst
Image Analyst 2019년 5월 4일
You're welcome. Could you accept the best answer, and at least vote for mine?
huda ali
huda ali 2019년 5월 4일
Thank you again and I vote for you

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Matrices and Arrays에 대해 자세히 알아보기

질문:

2019년 5월 4일

댓글:

2019년 5월 4일

Community Treasure Hunt

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

Start Hunting!

Translated by