
NOT GETTING PLOT , Actually i want a to find out the change in density,temp, pessure with altitude ( standard atmospheric properties). then use the density for other formula. plzz help . standard atmospheric prop. code given by friend,not understand
    10 visualizzazioni (ultimi 30 giorni)
  
       Mostra commenti meno recenti
    
    Sourav singh
 il 7 Mar 2021
  
    
    
    
    
    Risposto: Sourav singh
 il 7 Mar 2021
            function [rho,temp,press]=ceiling(h_in,toffset)
if nargin<2
    toffset=0;
end
if nargin<1
    h_in =0;
end
dimVarout=false;
if isa(h_in,'DimVar')
    h_in=h_in/u.m;
    dimVarout=true;
end
if isa(toffset,'dimVa')
    toffset=toffset/u.k;
end
TonTi=1-2.255769564462953e-005*h_in;
press=101325*TonTi.^5.255879734954165;
temp=TonTi*288.15+toffset;
rho=press./temp/287.05287424707439;
if dimVarout
    rho=rho*u.kg/(u.m^3);
    temp=temp*u.k;
    press=press*u.pa;
end
% formula 
    sigma=0.047193;
    V_tip=180;
    W=180;
    Cd_avg=0.01;
    R=2.235;
    A=pi*R.^2;
P_e= 61147.4;
P_req=((W)^(3/2))./sqrt(2.*rho.*A)+(Cd_avg*rho*sigma*A.*(V_tip).^3)./(8) +747.643-(0.3*P_e);
V_c=(P_e-P_req)./W;
hold on;
plot(V_c,h_in,'b--');
xlabel("V_c");
ylabel("h_in");
plot(P_req,h_in,'r--');
0 Commenti
Risposta accettata
  KALYAN ACHARJYA
      
      
 il 7 Mar 2021
        
      Modificato: KALYAN ACHARJYA
      
      
 il 7 Mar 2021
  
      This is a function file, you need to pass the correct specific input values to get the output. Once I tried with a random array vector of the same size for h_in and tooffset, some curve is generated as below.

If you are a beginner in MATLAB, try it out. Here nargin is just checking number input argument enter to the functions. Refer the MATLAB Docs for more detail
0 Commenti
Più risposte (1)
Vedere anche
Categorie
				Scopri di più su Graphics Objects in Help Center e File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

