matlab_instructions

matlab_instructions - ME365 MATLAB Introduction Notes...

Info icon This preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
ME365 MATLAB Introduction Notes - 1 - MATLAB INSTRUCTIONS FOR ME 365 (Updated: Fall 2004) This document is a much shortened version of the instruction set for MATLAB. It is intended to help you get started. Once you know the basics, the MATLAB help function can be used to help you learn the commands and how to run them. I like the student version manual, because it has examples that are helpful.
Image of page 1

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

View Full Document Right Arrow Icon
ME365 MATLAB Introduction Notes - 2 - TABLE OF CONTENTS A. The Preliminaries .......................................................................................................... 3 A.1 Computer Setup for MATLAB .................................................................................... 3 A.2 Unix commands while running MATLAB on a UNIX machine. .................................. 4 A.3. Some very basic commands. ................................................................................... 5 A.4 Getting Help .............................................................................................................. 7 A.5 Creating an M-file. ..................................................................................................... 9 A.6 Plotting a graph on the screen ................................................................................ 11 A.7 Sending the plot to the printer. ................................................................................ 13 A.10 Loading Data. ........................................................................................................ 14 B. Some Examples of Things You May Do. ................................................................. 16 B.1 Entering Data and Plotting it. .................................................................................. 16 B.2 The Dreaded "dot" Command, Subtitled: Loops Without Loops! ............................. 18 B.3 Calculating and Plotting a Step Response. ............................................................. 21 B.4 Calculating an Plotting a Frequency Response Function. ....................................... 22 C. A Little More Sophistication in MATLAB Programming .......................................... 25 C.1 Loops in a Fourier Series Example ......................................................................... 25 C.2 If Statements ........................................................................................................... 27 C.3 While Statements .................................................................................................... 27 C.4 Subroutines/Functions ............................................................................................ 28 C.5 Changing graph font sizes and line thickness, etc. ................................................ 29
Image of page 2