Shift data in row when NaNs occurs
Show older comments
I have a Cell array 15x112 that contains NaNs.
I want to shift the data in the rows, everytime I get a NaN.
% I have for instance:
0.30 NaN 0.24 0.26 0.67 0.37
0.49 0.35 0.55 NaN 0.43 0.54 . . .
% and I want to get:
0.30 0.24 0.26 0.67 0.37
0.49 0.35 0.55 0.43 0.54 . . .
Is there an easy way to do it?
Thanks
Accepted Answer
More Answers (0)
Categories
Find more on NaNs 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!