Example of referring elements, MATLAB Programming

Example of Referring elements:

the vector can also be extended. For illustration, the following generates a vector which has three elements. And then referring to the fourth element in an assignment statement, the vector is then extended to have four elements.

>> rv = [3 55 11]

rv =

3  55  11

>> rv(4) = 2

rv =

3  55  11  2

If there is a gap between the ends of the vector and the specified element, 0's are filled in. For illustration, the following extend the variable generated former again:

>> rv(6) = 13

rv =

3  55  11  2  0  13

 

 

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







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

Write discussion on Example of referring elements
Your posts are moderated
Related Questions
Hold and legend function: hold: is a toggle which freezes the present graph in the figure window, so that the new plots will be superimposed on the present one. Just hold

Error-Checking user input in the While Loop: In many applications, whenever the user is prompted to enter anything, there is a valid range of values. When the user enters a wr

String Manipulation: The string in MATLAB software consists of any number of characters and is contained in the single quotes. Actually, strings are considered as vectors in w

convolve the following sequences using tabulation method and verify the same using matrix mmethhod

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

How to make EMG analysis by Matlab?

How do you write a programme that asks the user for a number between 1 and 1000 and calculates the sum of its digits?

Objectives In the following exercises, students are required ?rstly to implement code to determine the frequency components present in a signal, and then to extract a desired si

Statement of Problem I need to realise vector-array multiplication in Simulink. This has been realised in Matlab but because the process yielding the received signal is in Simu

There are many approaches to numerically estimating the derivative of the function.  The relationship:   is called a forward difference, since the estimate of the derivativ