Creating column vectors, MATLAB Programming

Creating Column Vectors:

One way to generate a column vector is by explicitly putting the values in square brackets, separated by the semicolons:

>> c = [1; 2; 3; 4]

c =

1

2

3

4

There is no other direct way to use the colon operator to get a column vector. Though, any row vector generated using any of these methods can be transposed to get a column vector. In common, the transpose of a matrix is a new matrix in which the rows and columns are interchanged.

For vectors, transposing a row vector results in a column vector, and transposing the column vector results in a row vector. The MATLAB has a built-in operator, the apostrophe, to obtain a transpose.

>> r = 1:3;

>> c = r

c =

1

2

3

Posted Date: 10/18/2012 4:18:26 AM | Location : United States







Related Discussions:- Creating column vectors, Assignment Help, Ask Question on Creating column vectors, Get Answer, Expert's Help, Creating column vectors Discussions

Write discussion on Creating column vectors
Your posts are moderated
Related Questions
Show the output - algorithms: Where does the output go? The two possibilities are (i) to an external file, or (ii) to a window on the screen. Based on system, one of these wil

Various commands for get the help: There are various commands which can serve as an introduction to MATLAB and allow you to get the help: info will show contact informatio

how to wriet program for batch reactor

Solve the optimality condition for each P equation against M according to the following relation: Condition for Optimality:         ∇ M = λ ∇ P      with respect to C and T.

How can I separate a row vector into groups.

how to find matrix inverse using matlab command

Matlab Programming Vector Algebra : Create a program package for calculation of distances and intersections of lines and planes. Plot the results in a graphical representation

I want to write a function in matlab which gives me a population pyramid bar chart. could you please help me do this.

Appending data to a data File: A text file once exists; the data can be appended to it. The format is similar as formerly, with the addition of the qualifier -append. For illu

Matlab Scripts: Once a problem has been examined, and the algorithm for its answer has been refined and written, the algorithm then is translated into the specific programming