The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Matlab basic Tutorial
Replies: 3   Last Post: May 27, 2010 2:23 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Elite Hussar

Posts: 7
From: USA
Registered: 5/24/10
Matlab basic Tutorial
Posted: May 27, 2010 5:14 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Matlab Tutorial 1- The basic features
Let us start with something simple, like defining a row vector with components the numbers 1,2,3,4,5 and assigning it a variable name, say x

<< x=[1 2 3 4 5]

x =

1 2 3 4 5

Note that we used the equal sign for assigning the variable name x to the vector, brackets to enclose its entries and spaces to separate them. (Just like you would using the linear algebra notation). We could have used commas ( , ) instead of spaces to separate the entries, or even a combination of the two. The use of either spaces or commas is essential!
To create a column vector (MATLAB distinguishes between row and column vectors, as it should) we can either use semicolons ( ; ) to separate the entries, or first define a row vector and take its transpose to obtain a column vector. Let us demonstrate this by defining a column vector y with entries 6, 7, 8, 9, 10 using both techniques.
Read more matlab tutorial

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.