error in my code

조회 수: 1 (최근 30일)
saivijayaramchowdary
saivijayaramchowdary 2014년 2월 19일
답변: Jason R 2014년 2월 19일
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))

답변 (1개)

Jason R
Jason R 2014년 2월 19일
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.

태그

아직 태그를 입력하지 않았습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by