How to get back the original matrix?
Show older comments
Accepted Answer
More Answers (1)
Chunru
on 25 Mar 2022
A=[1 2 3 2;4 1 2 3;3 4 3 2;2 4 1 1];
% Reordering the rows of A is reversible
R=[1 3 4 2];
B=A(R,:);
% Straightening up the matrix into vector is also reversible
C=B(:)';
% Picking up part of the data is not reversible
D=[1 0 0 1 0 1 0 1 0 1 0 0 1 1 0 1];
E=C(D==1);
Categories
Find more on Programming in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!