As far as I can tell, there is no symbolic greater than comparison. Replace dg(i) with subs(dg(i)) to allow the comparison to occur.
error in my code
2 次查看(过去 30 天)
显示 更早的评论
clc
clear all
i=0;
for h=0:0.2:3
l=h+0.2;
i=i+1;
H1(i)=h;
k0=0.5;
syms x ;
if l<=0.54
dsigmah(i)=((k0*3/0.5)*18*(x));
dt(i)=int(dsigmah(i),x,h,l);
dsl(i)=(dt(i)/(200000*0.003));
k=((0.5*(0.5-0.33))+ (11.43*dsl(i)*0.33))/((0.5-0.33)+(11.43*dsl(i)));
k0=k;
dsigmah(i)=((k0*3/0.5)*18*(x));
dtc(i)=int(dsigmah(i),x,h,l);
dg(i)=abs(dt(i)-dtc(i))
if ((dg(i)>0.001))
k0=k;
dsigmah(i)=((k0*3/0.5)*18*(x));
dt(i)=int(dsigmah(i),x,h,l);
dsl(i)=(dt(i)/(200000*0.003));
k=((0.5*(0.5-0.33))+ (11.43*dsl(i)*0.33))/((0.5-0.33)+(11.43*dsl(i)));
k0=k;
dsigmah(i)=((k0*3/0.5)*18*(x));
dtc(i)=int(dsigmah(i),x,h,l);
dg(i)=dt(i)-dtc(i);
end
end
end
it shows that
??? Error using ==> sym.sym>notimplemented at 2621 Function 'gt' is not implemented for MuPAD symbolic objects.
Error in ==> sym.sym>sym.gt at 801 notimplemented('gt');
Error in ==> Untitled5 at 20 if ((dg(i)>0.001))
0 个评论
回答(1 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!