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
#defining matrix using only special commands

The natural frequencies of a fixed-fixed uniform shaft made of homogeneous material undergoing longitudinal vibration is given by rad/s, where L is the length of the bar, G is th

Appending data to a data File: A text file once exists; the data can be appended to it. The format is similar as formerly, with the addition of the qualifier -append. For illu

Write a MATLAB program that calculates the arithmetic mean, and the root-mean-square average for a given set of values. The output should be formatted as follows: Y

how can i used loops instead of polyfit function

Calling an User-Defined Function from Script: Now, we will change our script which prompts the user for the radius and computes the area of a circle, to call our function cal

Write a MATLAB program that calculates the arithmetic mean, the geometric mean, and the root-mean-square average for a given set of values. Your program must use 3 functions t

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

Input Function: The Input statements read in values from the default or standard input device. In most of the systems, the default input device is the keyboard; therefore the

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