matlabdemo_1 - SMS028 Self-Guided Matlab Tour #1 Lp1, '04...

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

View Full Document Right Arrow Icon
SMS028 Self-Guided Matlab Tour #1 Lp1, ’04 Matlab is a powerful mathematical software package that is widely used in engineering. In this session, you’ll learn some of the basics of Matlab such as: starting/stopping deFning/manipulating vectors plotting looping creating script Fles getting help 1 Starting/Stopping Matlab After logging into your account try starting matlab by typing: matlab With a full lab room, and everyone doing this at once, it will take some time to load. ..be patient. After a while you will see the screen Flled with three windows: Workspace, Command History, and Command Window. To quit Matlab, type quit in the command window. Some users prefer a simpler interface (and faster startup times!), in this case you can start up Matlab by typing matlab -nojvm , try it now. 2 DeFning/Manipulating Vectors To create and deFne a scalar (that is, a 1 × 1 vector, simply type: x = 5 Matlab will echo back the results by >> x=5 x = 5 Matlab is a matrix-based language, you can create and manipulate matrices simply. One way to create a vector is to type each element’s value within square brackets: x = [ 3 5 7 9 11 ] To create the matrix A = b 10 11 13 2 4 6 B you would type A = [ 10 11 13 ; 2 4 6 ]
Background image of page 1

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

View Full DocumentRight Arrow Icon
To create the matrix B = A T you would use the transpose operator “ B = A’ Another way to create a vector is to use the “ startvalue : increment : finalvalue
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 10/10/2009 for the course ECE 340 taught by Professor Djordjevic during the Fall '08 term at University of Arizona- Tucson.

Page1 / 5

matlabdemo_1 - SMS028 Self-Guided Matlab Tour #1 Lp1, '04...

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

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