{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Lecture1 - MATLAB Lecture 1 1 Introduction MATLAB is a...

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

MATLAB Lecture 1 1. Introduction MATLAB is a sofware package for high performance numerical computation and visualization. Its name is an abbreviation of Mat rix Lab oratory. Perhaps the best introduction to MATLAB is to compare it to Mathematica: MATLAB Mathematica Calculations Numerical computation Symbolic computation Everthing is a ... Matrix Function Functions are ... Lower case and use parentheses: Capitalized and use square brackets: sin(pi/3) Sin[Pi/3] To execute a command hit ... Enter Shift+Enter User Interface More primitive Slick Saving your work Create a diary Save as a Mathematica notebook MATLAB is particularly suited for dealing with vectors and matrices. Creating these structures is simple when compared with Mathematica. MATLAB also pro- vides tools for data analysis, signal processing, optimization, 2D and 3D graphics and other types of scientific computation. MATLAB started out as a numerical computation tool, as opposed to Mathematica which began as a symbolic algebra tool. What this means is that MATLAB thinks of π as a numerical value 3 . 14159 . . . by default, while Mathematica thinks of it as a symbol that can be evaluated numerically. Both packages have had to adapt and coopt features of one another. So now, MATLAB can also do symbolic calculations, and Mathematica can do numerical calculations. 2. Getting Started To bring up MATLAB, click on Start/All Programs/Matlab One essential difference between MATLAB and Mathematica is that MATLAB interacts with the file system. Note that the upper left hand window is titled “Current Directory.” This is where MATLAB will load and store files. For example, user defined functions will be stored in their own files, and session diaries will be explicitly written to files in that current working directory. To get to your AFS drive, type W:. Then click on desktop and right click in the window to create a folder (call this Math 126). Double click on it to work within that directory. It’s probably a good idea to make subdirectory called “Lecture 1” inside this. 1

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

View Full Document
3. Help MATLAB has a build in help function that you may call via the command help . You can ask for help on a specific command by entering help <command name> ; for example, “ help exp ”. You may also click on the ? in the toolbar to bring up the help window, which you navigate in the usual way. 4. Matrices The most important thing to remember in MATLAB is that everything is a matrix. An m × n matrix consists of m rows and n columns, containing a total of mn entries.
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 8

Lecture1 - MATLAB Lecture 1 1 Introduction MATLAB is a...

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

View Full Document
Ask a homework question - tutors are online