complicated system of 3 equations,3 unknowns

조회 수: 1 (최근 30일)
Faraz Vossoughian
Faraz Vossoughian 2017년 12월 5일
편집: Roger Stafford 2017년 12월 5일
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.

카테고리

Help CenterFile Exchange에서 Mathematics에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by