Illustration of modifying elements, MATLAB Programming

Assignment Help:

Illustration of Modifying Elements:

Illustration, the fifth element in the vector newvec is 9

>> newvec(5)

ans =

9

The subset of a vector, that would be a vector itself, can also be achieved using the colon operator. For illustration, the following statement would get the fourth through sixth elements of the vector newvec, and store the result in the vector variable b:

>> b = newvec(4:6)

b =

7  9  3

Any vector can be used for the indices in the other vector, not merely one created using the colon operator. For illustration, the following would get the first, fifth, & tenth elements of the vector newvec:

>> newvec([1 5 10])

ans =

1  9  15

The vector [1 5 10] is termed as index vector; it indicates the indices in the original vector which are being referenced.

The value stored in a vector element can be changed by identifying the index or subscript. For illustration, to change the second element from the vector b to now store the value 11 rather than of 9:

>> b(2) = 11

b =

7  11  3


Related Discussions:- Illustration of modifying elements

Simulation of a pn junction, would you please send the programing code simu...

would you please send the programing code simulation.

Algebra, what equation equals 36

what equation equals 36

Hold and legend function - plot functions, Hold and legend function: ...

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

Digging the dirt - autonomous mining robots , Digging the Dirt: Autonomous...

Digging the Dirt: Autonomous Mining Robots   Mining is a multi-billion dollar industry and a critical part of the Australian economy. Much of the day-to-day work on mining sites

ANFIS, how to design a digital fir filter using anfis in matlab.get the cod...

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

How to open simpower, How to Open Simpower: 1. Open MATLAB 2. ...

How to Open Simpower: 1. Open MATLAB 2. In the "Command Window" write ' simulink ' and press Enter or click on the Simulink icon. 3. Simulink Library Browser w

Image forgery detection , i have a problem in doing my project which detect...

i have a problem in doing my project which detects image forgery detection using resampling technique any one please help in writing my program

Illustrations of calling the function, Illustrations of calling the functio...

Illustrations of calling the function: Here are illustrations of calling the function: >> cylcost(32,73,4.50) ans = 661.5000 >> fprintf('The cost would be $%.2f\n'

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd