Function 'gt' is not implemented for MuPAD symbolic objects

5 vues (au cours des 30 derniers jours)
nima salyani
nima salyani le 9 Mai 2015
i want to find the solutions of this charactristric equation but i get the error'Function 'gt' is not implemented for MuPAD symbolic objects'.I know the reason is 'while' but i don't know how to solve this problem.
nc=3.8; ncl=3;
c0=3*1e8;
a=0.6*1e-6;
syms u w n real
Jn=besselj(n,u);
Jnp=diff(Jn,u);
Kn=besselk(n,w);
Knp=diff(Kn,w);
J0=Jnp/(u*Jn);
K0=Knp/(w*Kn);
CHA=(J0+K0)*(J0+(ncl/nc)^2*K0)-n^2*(1/u^2+1/w^2)*(1/u^2+(ncl/nc)^2*1/w^2);
Li=limit(CHA, w, 0);
v=zeros(1,10);
for t=0:9
dx=1;
iter=0; x=3;
S=subs(Li,n,t);
while abs(dx>0.0001)&& iter<200
iter=iter+1;
DC=-subs(S,u,x);
Dif=diff(S,w);
J=subs(Dif,u,x);
dx=DC/J;
x=x+dx;
end
v(t+1)=x;
end
EIGN_Frequency=v*c0*1e-14/(2*pi*a*sqrt(nc^2-ncl^2))

Réponses (1)

Matt J
Matt J le 9 Mai 2015
Make sure dx does not become symbolic,
dx=double(DC/J);

Community Treasure Hunt

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

Start Hunting!

Translated by