error in my code
Show older comments
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))
Answers (1)
Jason R
on 19 Feb 2014
0 votes
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.
Categories
Find more on Common Operations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!