Solve issue in Matlab R2018b
Ältere Kommentare anzeigen
I was using Matlab R2014a earlier where I was able to solve this equation easily, but in Matlab R2018b it is returning the
error in sol = solve(eqn,a,[0 pi]); I couldn't figure out why. The working code in Matlab 2014a is
syms a T
v2=-2.3750
g=1;
b=0;
e2=0.5;
k=2.5;
w=-2*cos(k);
eqn = sin(3*k+a)./sin(2*k+a)==v2-w+(g.*T.^2)+(e2.*T.^2.*sin(k)^2)./(sin(2*k+a)^2+b*T.^2*sin(k).^2);
sol = solve(eqn,a,[0 pi]);
digits(5)
solutions = vpa(subs(sol),3)
Please note that "a" is to be bound to take values between 0 and pi.
3 Kommentare
Image Analyst
am 28 Mär. 2019
What is the exact error (ALL the red text)? Have you tried it with R2019a?
madhan ravi
am 28 Mär. 2019
Only you can specify the range in vpasolve() where only one parameter is not known but with solve you can't specify the bounds.
John Jarvis
am 28 Mär. 2019
Bearbeitet: John Jarvis
am 28 Mär. 2019
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Solver Outputs and Iterative Display finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!