Hi,
I have a random mxn matrix, like 4×6 and I want it to be square. For example, a original 4×6 matrix would be created by deleting the first and second column to a formed a 4×4 matrix.
A = 0.8147 0.6324 0.9575 0.9572 0.4218 0.6557 0.9058 0.0975 0.9649 0.4854 0.9157 0.0357 0.1270 0.2785 0.1576 0.8003 0.7922 0.8491 0.9134 0.5469 0.9706 0.1419 0.9595 0.9340B = 0.9575 0.9572 0.4218 0.6557 0.9649 0.4854 0.9157 0.0357 0.1576 0.8003 0.7922 0.8491 0.9706 0.1419 0.9595 0.9340
How can I create from A to B without using loop or if-statment? and it should be work for all mxn, which m and n could be any number.
I started like this but got stunned. [m n] = size(A);
newA(m,:) = [];newA(:,n) = [];
Thanks
Best Answer