Matlab_tutorial - Outline Introduction Variables Operations...

Info iconThis preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon
Outline Introduction Variables Operations and functions Graphics Programming Simulink Matlab Tutorial, CDS110-101 Elisa Franco 29 September 2006 Elisa Franco Matlab Tutorial, CDS110-101
Background image of page 1

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

View Full DocumentRight Arrow Icon
Outline Introduction Variables Operations and functions Graphics Programming Simulink Introduction Variables Arrays Built-in variables Operations and functions Operations Linear algebra Polynomials Functions Graphics Programming Scripts and data management Functions Simulink Elisa Franco Matlab Tutorial, CDS110-101
Background image of page 2
Outline Introduction Variables Operations and functions Graphics Programming Simulink What is Matlab? Matlab (stands for ”Matrix laboratory”) is an environment which is suited to work with arrays and matrices, integrating visualization and computation. Visit the website http://www.mathworks.com. Several toolboxes (i.e. sets of precompiled routines) are available, specifically suited for different engineering fields: statistics, signal processing, control, data acquisition, symbiology . .. Matlab can be used both from the command window and by coding scripts. GUI’s are available for specific tasks. Files created in Matlab end in .m, data can be saved in files that end in .mat (we will see how). Elisa Franco Matlab Tutorial, CDS110-101
Background image of page 3

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

View Full DocumentRight Arrow Icon
Outline Introduction Variables Operations and functions Graphics Programming Simulink Where to get Matlab I Matlab is available for download if you are registered Caltech students I go to the url http://software.caltech.edu/ I log in with your CIT (IMSS) email account and psw I go to the ”software” section and download the latest available version of Matlab, R2006b (PC or MAC). I For MAC users: you need X11 http://www.apple.com/downloads/macosx/apple/x11formacosx.html Elisa Franco Matlab Tutorial, CDS110-101
Background image of page 4
Outline Introduction Variables Operations and functions Graphics Programming Simulink Command window Elisa Franco Matlab Tutorial, CDS110-101
Background image of page 5

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

View Full DocumentRight Arrow Icon
Outline Introduction Variables Operations and functions Graphics Programming Simulink Arrays Built-in variables How to define variables In Matlab, variables are arrays . You do not need to define their format (int, real . ..) or dimensions in advance, nor to declare them at the beginning of your program. One is mostly interested in defining: I Vectors I Polynomials I Matrices Elisa Franco Matlab Tutorial, CDS110-101
Background image of page 6
Outline Introduction Variables Operations and functions Graphics Programming Simulink Arrays Built-in variables How to define a vector Typing: >> a = [1 2 3 4]; or >> a = [ 1 , 2 , 3 , 4]; defines a row vector a = ( 1 2 3 4 ). Typing: >> a = [1 ; 2 ; 3 ; 4]; defines a column vector a = 1 2 3 4 . You can also use the transpose operation: a = [1 ; 2 ; 3 ; 4] 0 ; defines again a row vector. Type >> t = [0 : . 1 : 1] or >> t = 0 : . 1 : 1 . Defines a row vector t whose elements range from 0 to 1 and are spaced by . 1.
Background image of page 7

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

View Full DocumentRight Arrow Icon
Image of page 8
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 35

Matlab_tutorial - Outline Introduction Variables Operations...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online