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

1 次查看(过去 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