i have this matrix (M)
M=[ 1 NaN NaN 0.9 0.3; 2 14.1450 5.142 0.85 -0.1145; 3 NaN NaN NaN NaN; 4 NaN NaN 1.25 0.5; 5 18.45 9.3507 1.63 0.049; 6 NaN NaN NaN NaN; 7 17.16 0 0.7163 0.2791; 8 NaN NaN 1 0.35; 9 NaN NaN NaN NaN]
i want to reshape like this
P=[ 1 1 17.16 0 0.7163 0.2791; 2 6 18.45 9.3507 1.63 0.049; 3 3 14.1450 5.142 0.85 -0.1145; 4 5 NaN NaN 1.25 0.5; 5 2 NaN NaN 0.9 0.3; 6 8 NaN NaN 1 0.35; 7 4 NaN NaN NaN NaN; 8 7 NaN NaN NaN NaN; 9 9 NaN NaN NaN NaN ]
NOTE: in first matrix 3rd coloum 7 row it has zero that why it came 1st
earlier it was 9×5 then it convert into 9×6
how can i make this?
Best Answer