MATLAB: Plotting a 1*1 matrix

plotting a 1*1 matrix

Hi i want to plot a 1×1 matrix with time but i keep getting the same error ??? Error using ==> plot Invalid property found. Object Name : line Property Name : 'time'. My matrix has 10028 data,it's name is current and the code is the follownq: t=1:0.001:10; plot(t,current)

Best Answer

First, t and current need to be of same size, both 1x10028 (or 10028x1) vectors. So, for example, use
t = linspace(1,10,10028);
plot(t, current);
Note, that in the above case, time is an evenly spaced vector, starting at t=1 and ending at t=10 .