herm0016

Diamond Member
Feb 26, 2005
8,516
1,128
126
matlab is cool. i use it in my labs and classes. what is the issue?
 

Tiamat

Lifer
Nov 25, 2003
14,068
5
71
I remember matlab being very powerful, but i've long forgotten how to use it :(
 

ChAoTiCpInOy

Diamond Member
Jun 24, 2006
6,442
1
81
It's for this Aerospace class that I am doing. Have to plot a bunch of stuff and I'm having a hard time doing it. Don't get me wrong I know how to program (C++ and VB) but this is so weird.
 

duragezic

Lifer
Oct 11, 1999
11,234
4
81
Originally posted by: ChAoTiCpInOy
It's for this Aerospace class that I am doing. Have to plot a bunch of stuff and I'm having a hard time doing it. Don't get me wrong I know how to program (C++ and VB) but this is so weird.
Post what the question or problem is, then what you have done so far. I agree it is a bit different but with some more information and I know that you will get plenty of help here. Also maybe this should be in the Programming forum (it might get moved there). Lots of smart people there.
 

ChAoTiCpInOy

Diamond Member
Jun 24, 2006
6,442
1
81
It's a long problem. Basically create a routine that calculates the 1959 ARD Model standard atmosphere. Then create plots that show the standard atmosphere up to 400,000 ft. Plot temperature, pressure, and density on separate figures.
 

CycloWizard

Lifer
Sep 10, 2001
12,348
1
81
Originally posted by: ChAoTiCpInOy
It's a long problem. Basically create a routine that calculates the 1959 ARD Model standard atmosphere. Then create plots that show the standard atmosphere up to 400,000 ft. Plot temperature, pressure, and density on separate figures.
That model is full of fail. Don't bother.

Oh, and there IS an entire programming forum.
 

KillerCharlie

Diamond Member
Aug 21, 2005
3,691
68
91
When I did that for my first aero class we used Fortran. Matlab is awesome for that kind of stuff, until you need to do CFD, which requires raw numerical power.

 

drinkmorejava

Diamond Member
Jun 24, 2004
3,567
7
81
As someone else said, MATLAB is awesome, learn it.

BTW, you'll start liking it a lot more when it can solve all of your eigenvalue matrices when you get into CFD.

So what do you need, I can probably help.

If they give you the formulas, basically, create vectors with the values through while loops, then plot with plot(x,y,'r') where r is the color and can be lots of things, hint r=red, and x is a value in the vector

hold on; will let you plot more than one point on a graph

linspace(1,10,10) will give you a vector with ten values from 1 to 10 if you need that for something.


this will plot a straight line of 10 points

n=1;
x=linspace(1,10,10);
while n<11
plot(x(n),x(n),'g'); hold on;
n=n+1;
end
 

Fenixgoon

Lifer
Jun 30, 2003
33,282
12,847
136
Originally posted by: drinkmorejava
As someone else said, MATLAB is awesome, learn it.

BTW, you'll start liking it a lot more when it can solve all of your eigenvalue matrices when you get into CFD.

So what do you need, I can probably help.

If they give you the formulas, basically, create vectors with the values through while loops, then plot with plot(x,y,'r') where r is the color and can be lots of things, hint r=red, and x is a value in the vector

hold on; will let you plot more than one point on a graph

linspace(1,10,10) will give you a vector with ten values from 1 to 10 if you need that for something.


this will plot a straight line of 10 points

n=1;
x=linspace(1,10,10);
while n<11
plot(x(n),x(n),'g'); hold on;
n=n+1;
end

you gotta be careful though - if he makes a very small spacing, using hold will eat up lots of memory.

i'd rather preallocate the array, use a loop to calculate the values, and then plot outside of the loop. simple and fast.