Introduction to Matlab

Reasons I Use Matlab
1. Easy to use
2. Highly flexible
3. Powerful graphics
4. Matrix mathematics well-suited for data
5. netCDF interface

Matlab Basics Getting started.

Getting Help
1. The help Command
This is the easiest way to find out more about specific Matlab commands. The command help < name > gives information about the Matlab command < name > .

help sin     % Information about sine.
help i       % Information about i.
help log     % Information about log (base e)

By itself, help gives a list of topics in Matlab. To explore the topic 'elementary functions', use the command help elfun. The lookfor command can also be used to search for relevant information.

2. The Help Window
It is also possible to get help by clicking on the `Help' menu above the command window (OR hitting the '?' on the panel). The advantage of this method is that it is possible to navigate around various topics by double clicking on them.

3. The Support Desk <
The support desk is best for specific problems or bugs. There is so much information on the site, that finding what you are looking for can be tricky, but is a useful resource for more advanced users. Specific questions emailed to the support staff are usually answered within a day.

More on Arithmetic Operating on scalars and matrices. Demonstration of roundoff error. Entering functions.

Plotting a Sine Wave 2D and 3D plotting

Sonde Data File I/O

Model Output

Handle Graphics

Programming in Matlab
Example scripts:
   PlotEquiv.m, same plot as in 'Model Output' section

netCDF Toolbox
   Download netCDF libraries

the netCDF binaries for your system might already be available,
or look here for help building on other platforms.
   Download netCDF Toolbox
Note: you need to download both the toolbox AND mexnc
   Toolbox User's Guide
   The Toolbox Basics
   Converting MM5 Data to netCDF

   A note on indexing:
In Matlab, a matrix element can be referenced in two ways.
If A(TIME,LEVELS,LAT,LON), and nt = 55, nz = 23, ny = 91, nx = 109,
then A(1,23,10,10) = A(1048631),
where 1048631 = (i-1)*(55*23*91) + (j-1)*(55*23) + (k-1)*55 + t.

   Color Schemes (from the Department of Geography, U. of Oregon)