Example of linear indexing, MATLAB Programming

Example of Linear indexing:

For illustration, the following substitutes the whole second row with values from a vector The whole row or column could also be changed:

>> mat(2,:) = 5:7

mat =

2 11 4

5  6 7

Note that as the whole row is being modified, a vector with the correct length should be assigned.

 

 

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







Related Discussions:- Example of linear indexing, Assignment Help, Ask Question on Example of linear indexing, Get Answer, Expert's Help, Example of linear indexing Discussions

Write discussion on Example of linear indexing
Your posts are moderated
Related Questions
We wish to numerically perform the following integration: (a) Use Matlab's quad function to perform the above integral. (b) Analytically evaluate the integral (e.g. do t

Example of Hold and legend function: Running this script will generate two individual figure windows. If there is not any other active figure window, the first, that is the ba

Adaptive filters can also be used in other applications. Speech recognition, for example, is performed in a non-stationary environment, and therefore may require adaptive filtering

The Format Function and ellipsis: The default in MATLAB is to show numbers which have decimal places with four decimal places. The format command can be used to identify the o

How do I compute and plot a temperature profile along the x axis from -6 to 6 given the equation for steady state heat conduction and boundary conditions

how to wrote the mat lab programme and analysized for different refrigerant using in cascade refrigeration system

A 12-point sequence is x (n) defined as x(n) = { 1, 2, 3, 4, 5, 6, 6, 5, 4, 3, 2, 1}. Write MATLAB programs to (a) Determine the DFT X (k) of x(n) and plot (using stem function)

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

The Colon Operator: If the values in the vector are regularly spaced, the colon operator is used to iterate through these values. For illustration, 1:5 results in all the inte