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
how to create adjacency matrix for amino acids in matlab?

i want to extract an image from its background in matlab..the image is a binary image

Find the boundary between each two of the equations P1, P2, P3 by solving: P1 = P2  ,  P1 = P3  ,  P2 = P3 Plot the boundary lines on a single figure that also includes the

write a computer program that will provide a user with the equilibrium concentration of vacancies in a metallic element as a function of temperature.Temperature range should be men

what is an error and its types

In many applications, including ?nancial mathematics, ?nding zeros of a function f(x) = 0 (4) is paramount. One of the simplest method is the Bisection Method. The bisection

wite a function that will take In a simplex an an associated and return the nitial feasible solution of the tableau x as a column vector as well as the objective the objective fun

This problem description is taken from Illingworth and Golosnoy [1]: For physical systems of inhomogeneous composition, di usion is often observed to cause a change of phase, even

cAN Can I learn Metlab .I am X Scientist in DigitalCommunication. Can U please help me.I know the programming concepts

how to find absolute value of a number