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
Implement a MatLab function to calculate y.  The function should take two input arguments 1) A vector of parameters In the above example this would be of length 3, the first

Customizing a Plot: Line Types, Color, Marker Types: Plots can be completed in the Command Window, if they are really simple. Though, at many times it is desirable to customiz


the basic equation of modeling radioactive decay is where the amount of the radioactive substance is at time and is the decay rate. Some radioactive substances decay into other rad

Compute the result: To compute the area, the formula is required. In this situation, the area of the circle is π multiplied by the radius squared. Therefore, that means the va

Use Taylor series to derive the form of the truncation error of the approximation Suppose f € C3. Given that the roundo error has the similar form as in the Forward D

Operator Precedence Rules: A few operators have precedence over the others. For illustration, in the expression 4 + 5 * 3, the multiplication takes the precedence over additio

please tell me the procedure of Anova two Way analysis in matlab?

how to wriet program for batch reactor