Effacer les filtres
Effacer les filtres

Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

I tried all day to run my code syms R t; eqn = R*tan(1002​2.99039*R)​-(6.97964*​10^-3*sqrt​(t))/R==0 ; m = linspace(10,20,1) ; sol = zeros(size(t)) ; for i =1 :length(m) eqn = subs(eqn,t,m(i)) ; sol(i) = double(solve(eqn,R)) ; end plot(m,sol)

1 vue (au cours des 30 derniers jours)
this is my code
syms R t;
eqn = R*tan(10022.99039*R)-(6.97964*10^-3*sqrt(t))/R==0 ;
m = linspace(10,20,1) ;
sol = zeros(size(t)) ;
for i =1 :length(m)
eqn = subs(eqn,t,m(i)) ;
sol(i) = double(solve(eqn,R)) ;
end
plot(m,sol)
But when I running matlab give me the following issues
Error using mupadmex
Internal error with symbolic engine. Quit and restart MATLAB.
Error in sym>cell2ref (line 1303)
S = mupadmex(y);
Error in sym>tomupad (line 1241)
S = cell2ref(numeric2cellstr(x));
Error in sym (line 215)
S.s = tomupad(x);
Error in syms (line 197)
toDefine = sym(zeros(1, 0));
Error in SOLUCION1 (line 3)
syms R t;
any suggetion?

Réponse acceptée

Ameer Hamza
Ameer Hamza le 10 Juin 2018
It seems that there is some problem with symbolic math toolbox. If you are using R2017b or R2018a on windows 10 then you might try this recent update: https://www.mathworks.com/support/bugreports/1755918.
  3 commentaires
Ameer Hamza
Ameer Hamza le 12 Juin 2018
You are getting this warning because the analytical solution of this equation does not exist. In this non-linear equation, you cannot write a closed form solution of the form
R = f(t)
where f is an analytical function. Therefore, MATLAB gives this warning and return a numeric solution instead.
Walter Roberson
Walter Roberson le 12 Juin 2018
There are an infinite number of solutions. The normal value of the function is about -1E47, so you only get a zero of the function when tan(10022.99039*R) approaches infinity close enough to overcome the -1E47. The function is highly non-linear there, so finding the correct value is difficult.

Plus de réponses (0)

Cette question est clôturée.

Community Treasure Hunt

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

Start Hunting!

Translated by