584matlab

Info icon This 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

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern