MATLAB: Error using tabular/plot

3error using tabular/plot too many input arguments. error in testtttt (line 11) plot(tlinewidthrv

This is my code :
N=2002;
T=1E-6;
Fs=N/T;
V=C2matcap033;
F = Fs*[0:N-1]/N;
t=T*[0:N-1]/N;
figure()
plot(t,V,'LineWidth',3,'r');
grid on;
xlabel('Time (s)')
ylabel('Voltage (mV)')
axis tight
How can i manage this error:
Error using tabular/plot
Too many input arguments.
Error in testtttt (line 11)
plot(t,V,'r','LineWidth',3);

Best Answer

V=C2matcap033;
It appears that that is a table() object, so when you invoke
plot(t,V,'r','LineWidth',3);
it is the plot() method for table objects that is invoked instead of the plot method for numeric values.
I suspect you need something more like
V = C2matcap033.V;
or
V = C2matcap033.Voltage;
Use the name of the variable in the table that is storing voltages.
Related Question