Hi I have the code and i want the inverse mapping that is to get back P
P=[188 5 95 60;3 59 0 111;255 123 51 84 ];Ma=[25 222 80 6;100 1 190 97;73 33 254 184 ];M_1=zeros(size(Ma ));P_1=zeros(size(P ));for i=1:3[M_1(i,:),Index]=sort(Ma(i ,:));P_1(i,:) = P(i,Index );end%%%%%%Inverse
m_1=zeros(size(M_1));p_1=zeros(size(P_1));for j=1:3 [m_1(j,:),Index]=Ma(j,:);% here I dont need any sort commant bur error occurs here
p_1(j,:)=P_1(j,Index);endp_1
Best Answer