필터 지우기
필터 지우기

how to find the Reverse process of A(B).

조회 수: 2 (최근 30일)
Tanveer ul haq
Tanveer ul haq 2020년 3월 27일
편집: the cyclist 2020년 3월 27일
I have two arrays A and B. for instance,
A=[1 3 2 4 5 6 7 8 8 9 11];
B=[10 4 3 1 7 6 9 5 2 8 11];
in matlab
A(B)=[9 4 2 1 7 6 8 5 3 8 11];
My question is: How to calculate A, if B and A(B) are given.
Any help will be appericiated.

채택된 답변

Adam Danz
Adam Danz 2020년 3월 27일
편집: Adam Danz 2020년 3월 27일
A=[1 3 2 4 5 6 7 8 8 9 11];
B=[10 4 3 1 7 6 9 5 2 8 11];
C = A(B);
A2(B) = C;
However, if B contains duplicate values, A2 will not equal A.
  댓글 수: 1
the cyclist
the cyclist 2020년 3월 27일
편집: the cyclist 2020년 3월 27일
On that last point ...
To be clear, no algorithm would guaranteed to replicate A, if there are duplicate values in B, because there is insufficient information to do so. But you can find an A that is consistent with A(B) = C.

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

추가 답변 (1개)

the cyclist
the cyclist 2020년 3월 27일
C = [9 4 2 1 7 6 8 5 3 8 11];
A(B) = C

카테고리

Help CenterFile Exchange에서 Images에 대해 자세히 알아보기

제품


릴리스

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by