solving 5 non linear simultaneous equation
显示 更早的评论
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.h
kSol = sol.k
aSol = sol.a
bSol = sol.b
bsfcSol = sol.bsfc
采纳的回答
更多回答(2 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Calculus 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!