Matlab plotting help (homework help :p)

Oct 3, 2007 at 11:01 PM Thread Starter Post #1 of 4

rb67

Headphoneus Supremus
Joined
Nov 19, 2006
Posts
1,678
Likes
11
I figure with all the engineers/scientists/mathematicians on here, someone ought to be able to help me out.

I'm trying to plot two lines on a graph. One represents a T2/T1 vs M and the other represents P2/P1 vs M.

The T2/T1 ranges from 0 - 20 and P2/P1 ranges from 0-1

Thus, I want to have the y axis for T2/T1 on the left and the and the y axis for P2/P1 on the right since they are vastly different ranges.

Here's what I"m looking for
graph1.jpg


Here's what I've got
plot (M, Trat)
hold on
plot (M, Trat2, '--')
xlabel('Mach number')
ylabel('T2/T1')
plot (M, pstag)
plot (M, pstag2)

I'm not quite sure how to pot pstag (p/p) such that it's on a different scale than the Trat numbers, and I'm not sure how to put the pstag axis on the right once I make it.

I hope someone out there can help me out! Otherwise I'll be saying bye-bye to a lot of points on my hypersonics homework
tongue.gif
 
Oct 3, 2007 at 11:33 PM Post #3 of 4
Thanks a lot diogenes! That really helped. I wasn't quite getting how to apply get and gca. Problem solved
smily_headphones1.gif
 

Users who are viewing this thread

Back
Top