584matlab

Info iconThis preview shows page 1. Sign up to view the full content.

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

Unformatted text preview: Introduction to Plotting with Matlab Math Sciences Computing Center University of Washington September, 1996 Contents Fundamentals . . . . . . . . . . . . . . . . . . Making Plots . . . . . . . . . . . . . . . . . . Printing and Saving Graphs . . . . . . . . . . Loading Data Files . . . . . . . . . . . . . . . Title and Labels . . . . . . . . . . . . . . . . Other Interesting Features of Matlab Plotting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 2 5 5 6 6 Matlab is a program for solving engineering and mathematical problems. The basic Matlab objects are vectors and matrices, so you must be familiar with these before making extensive use of this program. To start Matlab type matlab to quit, type quit or exit. Fundamentals Matlab works with essentially one kind of object, a rectangular numerical matrix. Vectors and scalars are referred to as n-by-1 and 1-by-1 matrices respectively. Here is some basic information on using Matlab matrix commands. Entering Matrices The matrix 2 3 132 A=6 2 4 1 7 4 5 668 can be entered into Matlab by typing the following three lines. Each line ends by pressing the Return key. A= 132 241 6 6 8] 1 Generating Vectors With Even Space To plot a function, you must rst specify the data points at which the function will be evaluated. It is common to choose evenly spaced points and put then in a vector. Here is how you generate a row vector X containing the values from 0 to 10 in increments of 0.2. X = 0 : 0.2 : 10 Array Operations This term is used to refer to element-by-element arithmetic operations on vectors, instead of the usual linear algebra operations denoted by the symbols *, /, or^ (exponentiation). Preceding...
View Full Document

This note was uploaded on 03/01/2010 for the course ELECTRONIC 12345 taught by Professor Xyz during the Summer '10 term at Punjab Engineering College.

Ask a homework question - tutors are online