I have a set of 5 non-linear equations. first 4 equations are h,k,a,b –> in terms of variable 'bsfc'. the fifth equation bsfc^2 in terms of h,k,a,b. So i have 5 equations and 5 variables. This programming is basically finding the radius of the rotated ellipse. I have my x and y values too. However I am not getting the right solution.
The right solution is bsfc=246
I have my code here:
syms bsfc h k a b y=86; x=1717; phi=0; eqn1= h == 9.514*bsfc; eqn2= k == 0.0001*(bsfc+1)^2-0.07*bsfc+19; eqn3= a == 10* atan(bsfc/30 - 5.8) -3.5; eqn4= b == 0.025 * atan(bsfc/20 - 10.3) -0.022; eqn5= bsfc^2 == (((x-h)*cos(phi)+(y-k)*sin(phi))^2/(a^2)+ ((x-h)*sin(phi)-(y-k)*cos(phi))^2/(b^2))sol=solve([eqn1,eqn2,eqn3,eqn4,eqn5],bsfc,h,k,a,b);hSol = sol.hkSol = sol.kaSol = sol.abSol = sol.bbsfcSol = sol.bsfc
Best Answer