Preview

Matlab

Good Essays
Open Document
Open Document
18263 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Matlab
An Introduction to Matlab
Version 2.3

David F. Griffiths
Department of Mathematics The University Dundee DD1 4HN
With additional material by Ulf Carlsson Department of Vehicle Engineering KTH, Stockholm, Sweden

Copyright c 1996 by David F. Griffiths. Amended October, 1997, August 2001, September 2005. This introduction may be distributed provided that it is not be altered in any way and that its source is properly and completely specified.

Contents
1 MATLAB 2 Starting Up 2.1 Windows Systems . 2.2 Unix Systems . . . . 2.3 Command Line Help 2.4 Demos . . . . . . . . 3 Matlab as a Calculator 4 Numbers & Formats 5 Variables 5.1 Variable Names . . . . . . . . . . . . 6 Suppressing output 7 Built–In Functions 7.1 Trigonometric Functions . . . . . . . 7.2 Other Elementary Functions . . . . . 8 Vectors 8.1 The Colon Notation . . . . 8.2 Extracting Bits of a Vector 8.3 Column Vectors . . . . . . . 8.4 Transposing . . . . . . . . . 9 Keeping a record 10 Plotting Elementary Functions 10.1 Plotting—Titles & Labels . . 10.2 Grids . . . . . . . . . . . . . . 10.3 Line Styles & Colours . . . . 10.4 Multi–plots . . . . . . . . . . 10.5 Hold . . . . . . . . . . . . . . 10.6 Hard Copy . . . . . . . . . . 10.7 Subplot . . . . . . . . . . . . 10.8 Zooming . . . . . . . . . . . . 10.9 Formatted text on Plots . . . 10.10Controlling Axes . . . . . . . 11 Keyboard Accelerators 2 2 2 2 2 3 3 3 3 3 4

15 Examples in Plotting

13

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

16 Matrices—Two–Dimensional Arrays 13 16.1 Size of a matrix . . . . . . . . . . . . 14 16.2 Transpose of a matrix . . . . . . . . 14 16.3 Special Matrices . . . . . . . . . . . 14 16.4 The Identity Matrix . . . . . . . . . 14 16.5 Diagonal Matrices . . . . . . . . . . 15 16.6 Building Matrices . . . . . . . . . . . 15 16.7 Tabulating Functions . . . . . . . . . 15 16.8 Extracting Bits of Matrices . . . . . 16 16.9 Dot product of matrices (.*) . . . . 16

You May Also Find These Documents Helpful

  • Powerful Essays

    The Story of Crow Gultch

    • 10928 Words
    • 44 Pages

    (Please note: This paper (still a study- in-progress) is not to be cited or quoted without the permission of the author.)…

    • 10928 Words
    • 44 Pages
    Powerful Essays
  • Powerful Essays

    EAS230Syllabus

    • 1748 Words
    • 8 Pages

    MATLAB: command line mode, M files, data input, formatting output, file I/O, random numbers, statistics, reducing, solving equations, n equations in n unknowns, 2- and…

    • 1748 Words
    • 8 Pages
    Powerful Essays
  • Good Essays

    This examination is designed to test your ability to calculate efficiently with the aid of MATLAB as…

    • 1357 Words
    • 17 Pages
    Good Essays
  • Good Essays

    Irony in Richard Cory

    • 1089 Words
    • 5 Pages

    This Selection is brought to you for free and open access by the College Publications at DigitalCommons@C.O.D.. It has been accepted for inclusion in ESSAI by an authorized administrator of DigitalCommons@C.O.D.. For more information, please contact koteles@cod.edu.…

    • 1089 Words
    • 5 Pages
    Good Essays
  • Powerful Essays

    Coffee Commodity Chain

    • 10338 Words
    • 42 Pages

    All rights reserved. No part of this paper may be reproduced in any form, or stored in a retrieval system, without…

    • 10338 Words
    • 42 Pages
    Powerful Essays
  • Satisfactory Essays

    With this data, a graph can be created. The graph is a typical one-quadrant graph with an x-axis and y-axis. However, for this experiment, the x-axis would be _____ and the y-axis was replaced with ________.…

    • 389 Words
    • 2 Pages
    Satisfactory Essays
  • Best Essays

    References: Abstract - SpringerLink. (n.d.). SpringerLink - electronic journals, protocols and books.. Retrieved March 27, 2012, from http://www.springerlink.com/content/mlc0atymr41lllq3/…

    • 1697 Words
    • 7 Pages
    Best Essays
  • Powerful Essays

    Motor Cyclists

    • 48192 Words
    • 193 Pages

    © CARRS-Q, Queensland University of Technology 2006 To encourage the dissemination of this publication, it may be copied, downloaded, displayed, printed, reproduced, and distributed in unaltered form (retaining this notice). Subject to the provisions of the Copyright Act 1968, no other use of the material in this publication may be made without the authorisation of the Queensland University of Technology.…

    • 48192 Words
    • 193 Pages
    Powerful Essays
  • Powerful Essays

    BIO A01F-Fall 2010 - ASSIGNMENT # 2 - Preparing a Standard Curve using Excel 2007…

    • 534 Words
    • 3 Pages
    Powerful Essays
  • Powerful Essays

    ©2006 by Robert Kaestner and Xin Xu. All rights reserved. Short sections of text, not to exceed two…

    • 13888 Words
    • 56 Pages
    Powerful Essays
  • Powerful Essays

    Copyright Ó 2006 by Lawrence Erlbaum Associates, Inc. All rights reserved. No part of this book may be reproduced in any form, by photostat,…

    • 134194 Words
    • 537 Pages
    Powerful Essays
  • Satisfactory Essays

    Applied Aproblems

    • 1048 Words
    • 5 Pages

    ©2009 McGraw‐Hill Irwin. Used with permission from the publisher. Brickley, J. A., Smith, C. W., & Zimmerman, J. L. (2009).…

    • 1048 Words
    • 5 Pages
    Satisfactory Essays
  • Powerful Essays

    matlab tut

    • 1255 Words
    • 6 Pages

    he beginning of human life is the heart of the abortion debate. Why we never see pro-choice advocates, such like Planned Parenthood or NARAL, explaining where they believe life begins? Their most usual tactics is to shift the debate from whether abortion takes a human life to how "comprehensive sex education" and contraception can lower abortion rates. We are not debating the merits of different strategies to lower abortion rates, we are debating whether or not abortion takes human life, and one side almost never seriously addresses it. Maybe it's because people have a much easier time defending abortion when we don't talk about when life begins.…

    • 1255 Words
    • 6 Pages
    Powerful Essays
  • Good Essays

    Serial means ”One after another”. Serial communication is when we transfer data one bit at a time, one right after the other. Information is passed back & forth between the computer and Arduino by, essentially, setting a pin high or low. Just like we turn an LED on and off, we can also send data. One side sets the pin and the other reads it. MATLAB can read/send the data from/to the serial port of the computer and process it.…

    • 2752 Words
    • 12 Pages
    Good Essays
  • Powerful Essays

    Differential Equ

    • 5855 Words
    • 24 Pages

    Differential Problems in MATLAB 1. What Equations Can MATLAB Handle? 2. Where Can I Find Tutorials or Additional Information? Frequently Asked Questions 3. What Changes in Syntax Exist for ODE Solvers? 4. How Do I Reduce the Order of an ODE? 5. How Do I Solve Time-Dependent ODEs? 6. How Do I Use a Fixed Time Step? 7. How Do I Use Stochastic Differential Equations? Examples 8. Systems of Equations 9. Boundary Value Problem (BVP): Channel Flow Stiffness 10. What Is Stiffness? 11. Implicit vs. Explicit Methods 12. Examples Options 13. How Can I Change Options When Solving a Differential Equation? 14. What Option Parameters Can Be Modified? 15. How Can Options Be Used as Functions? Differential-Algebraic Equations and their Index 16. How Can Differential Algebraic Equations Systems Be Solved in MATLAB?…

    • 5855 Words
    • 24 Pages
    Powerful Essays

Related Topics