Info
Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.
I tried all day to run 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)
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
alburary daniel
am 10 Jun. 2018
Geschlossen: alburary daniel
am 13 Jun. 2018
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?
0 Kommentare
Akzeptierte Antwort
Ameer Hamza
am 10 Jun. 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 Kommentare
Ameer Hamza
am 12 Jun. 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
am 12 Jun. 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.
Weitere Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!