{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Matlab_example

# Matlab_example - Matlab Demo Geog 210a Good online info The...

This preview shows pages 1–2. Sign up to view the full content.

Matlab Demo Geog 210a Good online info: The Matlab Help utility is good – Use it… Kermit Sigmon (UF) Primer: http://math.ucsd.edu/~driver/21d-s99/matlab-primer.html The official Matlab webpage: http://www.mathworks.com/products/matlab/ Excellent Earth Modeling Course Lecture at WHOI (uses Matlab a lot): http://w3eos.whoi.edu/12.747/ Basics for Geog 210a : Plotting a function >> % The percent symbol says that the rest of the line is a “comment” >> % Makes an array of t from 0 to 2 pi - the semicolon stops the echo >> t = 0:0.01:2*pi; %Note this is a vector >> % calculates f at each value of t >> % Note: trig functions want radians & the dot before ^ >> f = sin(t/4) - cos(t.^2) + 0.1* t.^2 - 3; >> plot(t,f) >> xlabel('t') >> ylabel('f') >> title('Demo for Geog 210a') Using an m-file (a matlab script) to plot a function Get plotdemo.m from the class website. Open it using Matlab and run it (from the script window). Look at a script.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 2

Matlab_example - Matlab Demo Geog 210a Good online info The...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online