I want to plot a 3D graph.(adsbygoogle = window.adsbygoogle || []).push({});

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 (Text):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?

**Physics Forums - The Fusion of Science and Community**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Plotting 3D graphs for a script involving big loop

Can you offer guidance or do you also need help?

Draft saved
Draft deleted

Loading...

Similar Threads - Plotting graphs script | Date |
---|---|

Mathematica Graph Plotting Problem in Mathematica | Nov 22, 2016 |

Matlab Plotting graph 3D minimization | Nov 3, 2016 |

Matlab How to set zero value boxes transparent in 3D plots? | May 17, 2016 |

MATLAB how to automatically read a number of files | Oct 29, 2015 |

How to plot 3d graphs from multiple .dat files in matlab? | Jan 19, 2014 |

**Physics Forums - The Fusion of Science and Community**