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
A file houseafford.dat stores on its three lines years, median incomes and median home prices for a city. The dollar amounts are in thousands. For example, it might look like this:

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

A fence enclosure consists of a rectangle of length L and width 2 R , and a semicircle of radius R , as shown in Figure 1. The enclosure is to be built to have an area of 1600 m

Barrier Option pricing in Matlab using MC simulation or finite difference methods

Algorithms: Before writing any computer program, it is very useful to first outline the steps which will be essential. An algorithm is the series of steps required to solve a

The circuit diagram of an active filter is shown below. (a) Determine an expression for the transfer function of the filter. (b) Hence find an expression for the frequency res

Use the MATLAB randn function to generate 1000 points for x. Generate the output of the unknown system with the ?lter function and b=[1232 1] and a=[1]. Normalise the ?lter output

I need assistance in learning on how to do simulation of system described with an algebraic equations.

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

I have a file to be read in matlab which carries different columns in it. Each column has around 200000 readings in set of 2000. I want a code in a loop which gives stores each col