Problem with solve in Matlab R2018b

1 view (last 30 days)
John Jarvis
John Jarvis on 4 Apr 2019
This is in connection with the previous question here. Actually I have tried several ways but I am not getting the accurate
numeric solution which is such that `xx` is instead of , under the condition `a` between 0 and pi. By the way, the same
code used to do the job in R2014a. I don't understand what changed between R2014a ---> R2018b. I have tried the prescription in
this answer also but it doesn't solve the problem.
syms a T
v2=-2.3750;
g=1;
b=0.0001;
e2=0.5;
k=0.2;
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);
d = digits(5);
solutions = vpa(subs(sol),3)
xx=subs(real(solutions),T,0:0.1:3);
disp(xx)

Answers (0)

Categories

Find more on MATLAB in Help Center and File Exchange

Products


Release

R2018b

Community Treasure Hunt

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

Start Hunting!