matlab提示错误: DOUBLE cannot convert the input express,该怎么改?新人求教!

for j=1:77;
for i=1:2000;
t(1,j+1)=37;t(i,1)=75;
syms a cm
Q(i,j+1)=a*(1/0.0002)*(t(i,j)-t(i,j+1));
dt(i,j+1)=Q(i,j+1)*cm;
t(i+1,j+1)=t(i,j+1)+dt(i,j+1);
if (1<=j)&&(j<=4)
a=0.082;cm=82.62;
elseif (5<=j)&&(j<=34)
a=0.37;cm=362.04;
elseif (35<=j)&&(j<=52)
a=0.045;cm=25.61;
elseif (53<=j)&&(j<=76)
a=0.028;cm=0.236;
else
end
end
end

从 sym 转换为 double 时出现以下错误:
DOUBLE cannot convert the input expression into a double array.

出错 shiyunxing (line 7)
t(i+1,j+1)=t(i,j+1)+dt(i,j+1);

把 syms 那行删掉,执行一下 clear,再算可能就好了。你这里并没有用符号计算,不用声明符号变量。
温馨提示:答案为网友推荐,仅供参考
相似回答