필터 지우기
필터 지우기

i am trying to solve a 4 set of eqn for only two variables using loop and solve(), but it isnt working

조회 수: 1 (최근 30일)
%area(z) varies from z=1:101 but i need to specifically plot for interval (71<z<101)
%P2,P1,k,area@70, m2, At are known constants
%i only need to find mach(z) for corresponding area (z)
for z= 71:1:101
Eq1= AsAe(z)==(area(70)./area(z))*At;
Eq2= p2pe(z)==P2*P1*(1+0.5*(k-1)*mach(z).^2)^(k/(k-1));
Eq3= tet2(z)==(((1+0.5*(k-1)*mach(z).^2).^-1)*(1+0.5*(k-1)*m2^2)).^0.5;
Eq4= mach(z)==AsAe(z)*p2pe(z)*tet2(z)*m2;
S= solve([Eq1,Eq2,Eq3,Eq4],[mach]);
mach = double(S.mach);
mach(z)=mach;
end
figure(3);
plot(x,mach,'LineWidth',1.1);

답변 (0개)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by