MATLAB Language Split line with NaNs


Example

Interleave your y or x values with NaNs

x = [1:5; 6:10]';

x(3,2) = NaN
x =
     1     6
     2     7
     3   NaN
     4     9
     5    10

plot(x)

enter image description here