You get error at that line, because, you just removed the sort operation, which can provide two outputs.
The code can not have two outputs, when it is just a variable and no operation is performed on it.
Your code above doesn't perform what you wanted to do. You can perform or get the inverse, with the help of Index variable.
Here is the code that can be done, if you have Index variable
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 ];
Index = zeros(size(Ma));
P_1(i,:) = P(i,Index(i,:) );
p_1 = zeros(size(P_1));
for j = 1:3
p_1(j,Index(j,:)) = P_1(j,:);
Hope this helps.