Info

此问题已关闭。 请重新打开它进行编辑或回答。

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 次查看(过去 30 天)
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?

采纳的回答

Ameer Hamza
Ameer Hamza 2018-6-10
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 个评论
Ameer Hamza
Ameer Hamza 2018-6-12
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 2018-6-12
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.

更多回答(0 个)

此问题已关闭。

Community Treasure Hunt

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

Start Hunting!

Translated by