The code initially ran fine, but when i run it for the second time without doing any changes it is showing an error

조회 수: 3 (최근 30일)
t=[0 5 10 15 30 60];
COD1=[2395.8, 2142.2, 2103.2, 2096.2, 2123, 2094];
COD2=[2395.8, 2010, 1686.7, 1651, 1593.3, 1150];
COD3=[2395.8, 1131.7, 966.7, 820, 621.7, 436.7];
x1=[1,1,1,1,1,1];
COD11=COD1.*COD1;
COD22=COD2.*COD2;
COD33=COD3.*COD3;
y1=0.5*(x1./COD11);
y2=0.5*(x1./COD22);
y3=0.5*(x1./COD33);
hold on
plot(ccfit1,t,y1);
%plot(ccfit2,t,y2)
%plot(ccfit3,t,y3)
hold off

답변 (1개)

Hari
Hari 2022년 10월 5일
It is not possible to give an unambiguous answer to this question, as the ccfit1 variable has not been defined within the shared piece of code. From the error message it looks like size of the inputs to the plot function is incompatible. I would recommend to debug the probem by looking at the data, using a breakpoint on the line leading to error.

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by