complicated system of 3 equations,3 unknowns

1 次查看(过去 30 天)
I'm trying to solve a big system of 3 equations 3 unknowns, but i keep getting 0 for all three variables which i'm certain is wrong. I was wondering if im doing something wrong.alph1 alph2 alph3 are my equations and A1 A3 A5 are unknown. Please help me
syms A1 A3 A5 b cr ct
clc
AR=8;
lamda=0.4;
an=2*pi;
zerolift=deg2rad(-1.5);
angleofa=deg2rad(7.6);
teta=[pi/6,pi/3,pi/2];
lamda=0.4;
ct=lamda*cr;
eqn=(b^2)/((cr+ct)*(b/2))==AR;
b=solve(eqn,b);
y1=(-b/2)*cos(teta(1));
y2=(-b/2)*cos(teta(2));
y3=(-b/2)*cos(teta(3));
c1=-cr*((3*3^(1/2))/10 - 1);
c2=cr*(1+(1-lamda)*((2*y2)/b));
c3=cr*(1+(1-lamda)*((2*y3)/b));
n=1
alph1=((2*b)/(pi*c1))*((A1*sin(teta(n)))+(A3*sin(3*teta(n)))+(A5*sin(5*teta(n))))+zerolift+((1*A1*(sin(1*teta(n))/sin(teta(n))))+(3*A3*(sin(3*teta(n))/sin(teta(n))))+(5*A5*(sin(5*teta(n))/sin(teta(n)))));
n=2
alph2=((2*b)/(pi*c2))*((A1*sin(teta(n)))+(A3*sin(3*teta(n)))+(A5*sin(5*teta(n))))+zerolift+((1*A1*(sin(1*teta(n))/sin(teta(n))))+(3*A3*(sin(3*teta(n))/sin(teta(n))))+(5*A5*(sin(5*teta(n))/sin(teta(n)))));
n=3
alph3=((2*b)/(pi*c3))*((A1*sin(teta(n)))+(A3*sin(3*teta(n)))+(A5*sin(5*teta(n))))+zerolift+((1*A1*(sin(1*teta(n))/sin(teta(n))))+(3*A3*(sin(3*teta(n))/sin(teta(n))))+(5*A5*(sin(5*teta(n))/sin(teta(n)))));
eqn1=alph1==zerolift;
eqn2=alph2==zerolift;
eqn3=alph3==zerolift;
sol=solve([eqn1,eqn2,eqn3],[A1,A3,A5]);
A1=sol.A1;
A3=sol.A3;
A5=sol.A5;
  1 个评论
Star Strider
Star Strider 2017-12-5
I edited your Question to select your code, and used the [{}Code] button to format it correctly.

请先登录,再进行评论。

回答(1 个)

Roger Stafford
Roger Stafford 2017-12-5
编辑:Roger Stafford 2017-12-5
You have included 'zerolift' in the alpha equations, but in the 'eqn' equations you have also set the expressions to 'zerolift' which cancels it out. Hence, all zeros would be the solution. You should be consistent. Either include it in the alpha's or include it in the equ's, but not both.

Community Treasure Hunt

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

Start Hunting!

Translated by