How to remove the zeros in a matrix and reduce its size.
I want it to be like this:
745,4.8
740,3
747,11
742,13
746,7.2
741,12.2
Matlab matrix: https://drive.google.com/file/d/1P5h6lhs0O2fxFcxHabAO4hU84UqAZD1m/view?usp=sharing
Can some one give me some tips/pointers on how to do it?
load('matlab_matrix.mat')
L=length(num);
num2=num(4:72,:);
L2=length(num2);
L3=length(num2(1,:));
for i=1:L2;
for j=1:L3;
if isnan(num2(i,j)) ~= 1;
A(i,j)=num2(i,j);
end
end
end
