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);

 채택된 답변

Walter Roberson
Walter Roberson 2021년 2월 10일

0 개 추천

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.

댓글 수: 1

nurul auni
nurul auni 2021년 2월 14일
Sorry for the late response. Your answer is correct. The output data should be in 'column vector' or 'numeric' not in a 'table'.
Thank you in advanced.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

dpb
dpb 2021년 2월 10일

0 개 추천

Named parameters must follow X,Y,linespec triplets.
plot(t,V,'r','LineWidth',3);
instead. Or, alternatively,
plot(t,V,'LineWidth',3,'Color','r');

댓글 수: 1

nurul auni
nurul auni 2021년 2월 14일
Sorry for late response. Thank you so much for the answer. I'm already do this but still an error. And i found the answer. Again, Thank you!

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

질문:

2021년 2월 10일

댓글:

2021년 2월 14일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by