Im extracting time-dependent data from a .dat file, and using the spline function, matching the values to an existing time-vector in use. For some reason the length function is failing to read the length of the vector.
I can recreate the error with this blurb:
x = linspace(1,98,76)';
y = 20.*x-5.*x.^2;
t = linspace(0,100,1000)';
yy = spline(x,y,t);
length(yy)
It returns
??? Subscript indices must either be real positive integers or logicals.
It shows in my workspace that yy is 1000x1 double, and max(size(yy)) works fine. Any idea on what creates this error?