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
#defining matrix using only special commands

In the manufacturing of ball bearings, the components, such as the ball, are hardened through a process of heating and then rapid cooling or "quenching" by submersion in an oil or

Savannah says that the least common multiple of 4 and 6 is 24. Is she right or what is her mistake?

Write the iterative Newton root nding function from lecture to be recursive. The function declaration should be root = newtonRec(f,df,x,tol). The inputs to the function are: ?

how to implement 3 out of 4 visual cryptography?

The fuel consumption of a certain make of car may not be exactly that rated by the manufacturer. Suppose ten cars of the same model were tested for combined city and highway fuel c

1. Enter the 3×4 matrix Let a ij denote the entry of A in the ith row and jth column. Use Matlab to compute the following : (a) a 13 + a 32 (b) Three times the

1) Convert the table into format convenient for the processing with MATLAB. 2) Prepare a program that perform K Nearest Neighbours algorithm using Euclidian distance. (Your prog

how to wriet program for batch reactor

The IF-ELSE Statement: The if statement selects whether an action is executed or not. Selecting between the two actions, or selecting from numerous actions, is accomplished by