solving implicit equation with 3 variables knowing 2 of them

2 views (last 30 days)
Hi, I'm trying to solve the the equation shown in the attachment as you see it's function of three variables M,theta, and beta where lamda is 1.4, so given M and theta I would like to get the two corresponding values of beta. I have tried this:
syms beta;
M1= 5;
theta=20*pi/180;
gama=1.4;
eqn=tan(theta)==2*cot(beta)*((M1^2*sin(beta)^2-1)/M1^2*(gama+cos(2*beta)+2));
beta=solve(eqn,beta,'ReturnConditions',true);
% betadeg=beta*180/pi;
vpa(beta)
But I keep getting these errors
Error using sym>tomupad (line 1256)
Unable to convert 'struct' to 'sym'.
Error in sym (line 199)
S.s = tomupad(x);
Error in vpa (line 46)
ss = sym(s);
Error in untitled (line 8)
vpa(beta)
I would really appreciate your help. Thanks.

Accepted Answer

Birdman
Birdman on 28 Mar 2018
Replace
vpa(beta)
with
vpa(beta.beta,3)
  6 Comments

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!