Vectors and matrices, MATLAB Programming

Vectors and Matrices:

The Vectors and matrices are used to store sets of values, all of which are similar type. A vector can either be a column vector or a row vector. The matrix can be visualized as a table of values. The dimensions of a matrix are r x c, here r is the number of rows and c is the number of columns. This is pronounced as "r by c." If the vector has n elements, the row vector would have dimensions 1 x n, and a column vector would have the dimensions n x 1. The scalar (one value) has dimensions 1 x 1. And hence, vectors and scalars are actually just subsets of matrices. Here are some diagrams shown below, from left to right, a scalar, a column vector, a row vector, and the matrix:

16_Vectors and Matrices.png

The scalar is 1 x 1, the column vector is 3 x 1 (3 rows by 1 column), the row vector is 1 x 4, and the matrix is 3 x3. All the values stored in these matrices are stored in what are termed as elements.

The MATLAB is written to work with matrices; the name MATLAB is short for "matrix laboratory." For this reason, it is very easy to generate vector and matrix variables, and there are so many operations and functions which can be used on vectors and matrices.

A vector in a MATLAB is equal to what is termed as a one-dimensional array in other languages. The matrix is equal to a two-dimensional array. Generally, even in the MATLAB, some operations which can be performed on either vectors or matrices are referred to as array operations. The word array also is often used to mean generically either a vector or a matrix.

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

Related Discussions:- Vectors and matrices, Assignment Help, Ask Question on Vectors and matrices, Get Answer, Expert's Help, Vectors and matrices Discussions

Write discussion on Vectors and matrices
Your posts are moderated
Related Questions
Linspace function: Likewise, the linspace function generates a linearly spaced vector; linspace(x,y,n) generates a vector with n values in the inclusive range from x to y. For

It is desired to determine the DFT of the analogue signal x (t) = 25 cos(10 Πt)cos(400Πt). (a) Find the Nyquist rate of the signal.   (b) What is the record (signal) length i

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

illustration of for loop: illustration, to print a column of numbers from 1 to 5: for i = 1:5 fprintf('%d\n',i) end   This loop can be entered in the Command Wi

hey ! why the command sawtooth and square does not exist in Matlab R2012a?

coding of sep protocol

Use MATLAB and a method based on linear predictive coding for the restoration of a clipped voiced speech signal. My proposed algorithm is based on linear prediction where a reco

The occurrence of bushfires in the Port Stephens area may be modelled by a Poisson process. The average occurrences of bushfires n is assumed to be either 15 (event A 1 ), 20 (even

The fundamental theorem of calculus states that the de?nite integral of a function may be found from the antiderivative of the function. However, for many functions, it is much eas

Background Protein therapeutics are a major component of the biotechnology industry, with sales estimated in the range of ~$99bn annually (2011) and steady market growth. Many phar