0% found this document useful (0 votes)
38 views33 pages

Day 1 Lecture

This document provides an overview and introduction to using Matlab. It discusses setting up the Matlab environment, performing basic calculations, matrix math functions, plotting data, and fitting curves. The document notes that Matlab allows UNIX commands, stores variables and formulas in the workspace, and has functions to save and restore the state of a Matlab session. Examples are provided on modeling systems of forces with matrices and plotting exponential cooling data.

Uploaded by

Sarah Tan
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views33 pages

Day 1 Lecture

This document provides an overview and introduction to using Matlab. It discusses setting up the Matlab environment, performing basic calculations, matrix math functions, plotting data, and fitting curves. The document notes that Matlab allows UNIX commands, stores variables and formulas in the workspace, and has functions to save and restore the state of a Matlab session. Examples are provided on modeling systems of forces with matrices and plotting exponential cooling data.

Uploaded by

Sarah Tan
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 33

Lecture 1: Using Matlab

Using Matlab Setting Up for Matlab Basic Calculations The Matlab Environment Matlab Functions Matrix Math Matrix Math A Motivating Example Examine the Lift Linkage Model a System of Forces Support Forces Forces on the Bin System of Equations What Force for 10lbs Weight? What about other Weights? Call the m-file Expand the m-file The Matrix Determinant Plotting Data in Matlab Matlab plots data, not functions A Motivating Example Cool Time Data Plotting Data Why an Exponential Look? Convective Cooling Curve Fitting Transform Data to a Linear Form Plot the Ln Data Find the Least Squares Fit Plot both Data and Line Formatting Plots Plot the Exponential Equation

Notes:
This the first day of matlab, and presumes you have sat through the Introduction to Matlab training session.

Notes:
First you need to set up your athena (server) environment to be matlab-happy.

Notes:
Matlab does basic calculations as you would expect.

Notes:
In matlab, you can do all the UNIX commands. There is an idea of the matlab workspace. As you define variables and formulas, they are stored, overwritten, expanded, deleted. But there is a state of the matlab environment at any point. You may choose to leave matlab because of time pressure. You can store the state of matlab with a save command. Then quiot matlab, and leave. Later, after starting matlab, just enter load, and the file matlab.mat will be loaded, which restores the state of matlab to what it was when you did the save.

Notes:
There are many matlab functions..

Notes:
lets try some matrix math.

Notes:
Now lets see how we might use this.

You might also like