Creating matrix variables, MATLAB Programming

Creating Matrix Variables:

Creating a matrix variable is actually just a generalization of creating a row and column vector variables. That is, the values within the row are separated by either commas or spaces, and the various rows are separated by the semicolons. For illustration, the matrix variable mat is created by explicitly typing the values:

>> mat = [4 3 1; 2 5 6]

mat =

4   3    1

2   5    6

There should always be similar number of values in each row. If you try to generate a matrix in which there are various numbers of values in the rows, the outcome will be an error message; for illustration:

>> mat = [3 5 7; 1 2]

??? Error using ==> vertcat

 

 

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







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

Write discussion on Creating matrix variables
Your posts are moderated
Related Questions

i am doing my project on matlab and the topic of my project is invisible watermarking.How we can extract all pixel values of image in binary form.


Solution by using pdepe function functionpdex1 m = 0; x = linspace(0,1,100); t = linspace(0,0.2,10);   sol = pdepe(m,@pdex1pde,@pdex1ic,@pdex1bc,x,t); % Ext


how to design a digital fir filter using anfis in matlab.get the code for that.

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

Answers should be submitted in an MS Word document. Simulations should accompany answers in a separate MATLAB file. 1)  Queuing Simulator: Consider a communications router that

Linear indexing: This is termed as linear indexing. It is generally much better style when working with the matrices to refer to the row and column indices, although. An in

Plot way forms for the following modulation schemes using Matlab: a)      2 ASK                     b)  BFSK                                  c) BPSK          4 ASK