VCL MATLAB Help Page 1 of 1

Help with the Matrix Laboratory

 Can't find help with a specific problem? Drop a line to jdjacob@engr.uky.edu and let me know.

This help file is a single page - the links let you jump to various locations in the page for ease of use. As always, type help or help command for more information on the command you need.

Last updated Nov. 5, 2001.

Contents

General Help

Every version of MATLAB comes with a help window and a help desk. The help window is a categorized listing of all MATLAB commands - you can also find help on a given command by using the command window and typing "help command" to give you the same information as found in the help window. The help desk is a HTML document with a searchable index. Both of these help items can be found by using the Help menu in the command window. The help desk can also be found online here.

Further support can be found at the MATLAB home page at MathWorks under support.

Also, to view the MATLAB demos, type demo at the command prompt. A demo window should appear giving you a variety of demo programs to choose from. There are a number of sample programs to show what you can do with MATLAB.

Sample Scripts

Sample scripts (M-files or MATLAB programs) will be uploaded here for your use. To run these, download them and place them on your local hard or floppy drive. To run them directly from the command window, use the cd command in MATLAB to change directories or open the script in the editing window (debugger) and run it directly from there. You can also use the run command.

Examples (from Palm)

• circuit.m - Demonstrates matrix algebra though analysis of the circuit shown here.
• udf.m - Simulation of velocity and acceleration of an unducted fan turboprop engine.

Homework Solutions

Homework solutions will be posted after the due-date.

Plots of Some Interest

Here are some plot commands you may find useful, or alternatively, cool. Just enter them as written below, then explore!

• 2-D plot of two vectors, a and b (must be same size), with equal axis

>>a=[0:10]
>>b=a.^2

>>plot(a,b)
>>plot(a,b,'ro--')

• 3-D plot of a sphere using sphere, mesh, and surf commands

>>[x,y,z]=sphere(20)
>>mesh(x,y,z), axis equal
>>surf(x,y,z), axis equal

• MATLAB logo

>>surf(L,R)
>>surf(L,R), colormap(M)
>>surf(L,R), axis off

• contour plot using contour and contourf commands (peaks is a function producing sample output in MATLAB)

>>elevation=peaks(50)
>>contour(elevation)
>>contour(elevation,25)
>>contourf(elevation,25)