Hi everyone,
So I have a numeric matrix "walknov" with several columns of different lengths and I interpolated them all to be 100 points and created a new matrix "CC" with the following loop:
A(any(isnan(A),2),:) = [];
NaNs fill the differences of length between columns, so I have eliminated each row containing NaN everytime I interpolate each column. The problem is that some columns have no values at all (i.e. only NaNs) and this makes the loop stop as the interpolation function won't accept such values.
I do not want to drop the column as I need the matrix to match other matrices, but instead I would like to just leave NaN values in those missing columns. Is there a way to solve this?
Thanks a lot!
PS: I have attached a sample dataset
0 Comments
Sign in to comment.