i am trying to solve a 4 set of eqn for only two variables using loop and solve(), but it isnt working
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
%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 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Line Plots dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!