error in the following code

alpha = 0.087; lamdas =0; mu_0 =1.1; Tf =1793; q =3.6;
Tint= 573; % initial assumed value
%Tf= 1793; % melting point of the material
%mu_0= 1.1; % property of the material in consideration
%q= 3.6; % property of the material in consideration
mu = mu_0*(1-(Tint/Tf)^q);
lamda= atan(mu); % friction angle
phi= (pi/4)+ 0.5*(alpha-atan(mu));
syms phi alpha lamda lamdas x
p=(cos(phi-alpha)*sin(phi)*sin(x))-(tan(lamdas)*((cos(phi-alpha))^2)*cos(x))+((cos(alpha)- sin(phi-alpha)*sin(phi))*tan(lamda)*sin(x)*cos(x))+(tan(lamda)*tan(lamdas)*sin(phi- alpha)*cos(phi-alpha)*(cos(x))^2);
q=diff(p,x);
r=diff(q,x);
f= @(x) (p);
df= @(x) (q);
ddf= @(x) (r);
x1= 0.1;
acc= 0.001;
y1= f(x1);
y2= df(x1);
y3= ddf(x1);
while(((y1*y3)/(y2*y2))>1),
x1=0.1;
y1= f(x1);
y2= df(x1);
y3= ddf(x1);
end;
x2=(x1-(y1/y2));
while (abs(x2-x1)>acc),
x1=x2;
y1= f(x1);
y2= df(x1);
%y3= ddf(x1);
x2=(x1-(y1/y2));
end;
x= fzero(@(x)(p),1);
for the above code, the error i am getting is as follows:
??? Error using ==> sym.sym>notimplemented at 2653 Function 'gt' is not implemented for MuPAD symbolic objects.
Error in ==> sym.sym>sym.gt at 801 notimplemented('gt');
Error in ==> diff_eta_c at 35 while(((y1*y3)/(y2*y2))>1),
thank you :-)

Antworten (0)

Diese Frage ist geschlossen.

Gefragt:

am 15 Apr. 2015

Geschlossen:

am 20 Aug. 2021

Community Treasure Hunt

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

Start Hunting!

Translated by