Expand a matrix, MATLAB Programming

Expand a matrix:

To expand a matrix, an individual element could not be added as that would mean there would no longer be the similar number of values in every row.

Though, the whole row or column could be added. For illustration, the following would add a fourth column to the matrix:

>> mat(:,4) = [9 2]'

mat =

2 11 4 9

5  6 7 2

Now as we saw with vectors, if there is a gap between the present matrix and the row or column being added, the MATLAB will fill in with zeros.

>> mat(4,:) = 2:2:8

mat =

2   11   4   9

5    6    7   2

0    0    0   0

2    4    6   8

 

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







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

Write discussion on Expand a matrix
Your posts are moderated
Related Questions
Hi, I need help with solving five-1st order ODE which are coupled. I need to plot these as well. Could I please get a quote. Thanks

Error in variables statements: Error: The expression in the left of equals sign is not a valid target for an assignment. >>  By placing a semicolon at the end of the sta

I need my data mining assignment done. Can you guys help me with that?

I have an assignment to do by MATLAB : the assignment is to design Script that makes (Panorama Stitching) for multiple pictures .. for more information see the link : tobw.net/inde

1) Identify an equation that describes some chemical process.  Your equation should have at least two parameters, at least one of which should contribute in a non-linear way. He

Characters and Encoding: A character in a MATLAB is represented by using single quotes (example, 'a' or 'x'). The quotes are essential to denote a character; without them, the


The MATLAB system having of five main parts: * Handle Graphics. * The MATLAB working environment. * The MATLAB language. * The MATLAB mathematical function library.

can you please help me with matlab coding for CMP? I am new to matlab and hence need help

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