INTRO: I have an array M as below:
M= 1 4 2 NaN 3 10 4 NaN 5 NaN 6 15 7 NaN 8 17 9 59 10 NaN
GOAL: I want to plot the second versus the first column as follow:
M=load('M.txt');h=plot(M(:,1),M(:,2));
PROBLEM: Due to the NaN, it does not plot the gaps correctly and breaks the continuity of the graph.
I wonder if someone could suggest me to some command lines that could fix this issue.
I thank you in advance for your help
Emerson
Best Answer