New Reply

Plotting 3D graphs for a script involving big loop

 
Share Thread Thread Tools
Apr2-12, 07:07 AM   #1
 

Plotting 3D graphs for a script involving big loop


I want to plot a 3D graph.
A solid graph and a wireframe mesh graph.

What are the different ways to do it in this script.
The variables i want to be plotted in this script are 'pic' 'TSFC' 'NonFs'.
Dont mind the working, everything is correct. The only matter of concern is the 3d graph and the variables to plot.

What are the different ways that i can do it?

Script attached and pasted below as well.

Code:
clear
gamma=1.4;
gammat=1.33;
cpt=1156.697;
cpc=1004.5;
Qr=42800*10^3;

P0=21.73*10^3;
Pt0=170.025*10^3;

T0=216.67;
Tt0=390;

V0=590.1119;
a0=(gamma*287*T0).^0.5;

Pt2=Pt0;
Tt2=Tt0;
Tt4=(7*cpc*T0)/cpt;
P9=P0;

for i=1:40
    
    pic(i)=i;
    
    %Compressor
    Pt3(i)=pic(i)*Pt2;
    
    Towc(i)=pic(i).^(2/7);
    Tt3(i)=Towc(i)*Tt2;
    
    %Burner
    Pt4(i)=Pt3(i);
        
    f(i)=(cpt*Tt4 - cpc*Tt3(i))/(Qr - cpt*Tt4);
    
    %Turbine
    Tt5(i)=Tt4 - ((cpc*(Tt3(i)-Tt2))/(cpt*(1+f(i))));
    Towt(i)=Tt5(i)/Tt4;
    
    pit(i)=Towt(i).^(gammat/(gammat-1));
    Pt5(i)=Pt4(i)*pit(i);
    
    %Nozzle
    Pt9(i)=Pt5(i);
    Tt9(i)=Tt5(i);
    
    M9(i)= (5 * ( (Pt9(i)/P9).^((gammat-1)/gammat) -1 ) ).^0.5;
    
    T9(i)=Tt9(i)./(1+0.5*(gammat-1)*(M9(i).^2));
    
    V9(i)=M9(i).*(gammat*287*T9(i)).^0.5;
    
    Fs(i)=(1+f(i)).*V9(i)-V0;
    TSFC(i)=(1000000.*f(i))./Fs(i);
    NonFs(i)=Fs(i)./a0;
    
end
clear i

%dont mind the working, everything is correct, the main matter of concern
%is the graph, and the variables to plot which are 'pic' 'TSFC' And 'NonFs'

%i want to draw  a 3D graph of these variables, either contour, or a
%wireframe or solid....what are the different ways to do it?
Attached Files
File Type: m Question_4_19_c_test2.m (1.3 KB, 0 views)
PhysOrg.com
PhysOrg
science news on PhysOrg.com

>> Ants and carnivorous plants conspire for mutualistic feeding
>> Forecast for Titan: Wild weather could be ahead
>> Researchers stitch defects into the world's thinnest semiconductor
New Reply

Tags
3d graph, 3d plot, for loop, mesh, surf
Thread Tools


Similar Threads for: Plotting 3D graphs for a script involving big loop
Thread Forum Replies
How to use decimals in while loop in shell script Programming & Comp Sci 5
Plotting graphs help General Physics 2
plotting and modifying graphs Computing & Technology 1
plotting graphs in Excel Computing & Technology 2
plotting graphs Introductory Physics Homework 2