To change a variable, MATLAB Programming

To change a variable:

To change a variable, the other assignment statement can be used that assigns the value of a different expression to it. Consider, for illustration, the following sequence of statements:

>> mynum = 3

mynum =

3

>> mynum = 4 + 2

mynum =

6

>> mynum = mynum + 1

mynum =

7

In the initial assignment statement, the 3 is assigned to the variable mynum. In later the assignment statement, mynum is changed to have the value of the expression 4 + 2, or 6. At the third assignment statement, mynum is changed all over again, to the result of the expression mynum +1. As at that time mynum had the value 6, the value of the expression be 6+1, or 7.

Posted Date: 10/18/2012 3:26:36 AM | Location : United States







Related Discussions:- To change a variable, Assignment Help, Ask Question on To change a variable, Get Answer, Expert's Help, To change a variable Discussions

Write discussion on To change a variable
Your posts are moderated
Related Questions
The Requirement details of project are as below. I also need detail description for presentation. For the project, given the training dataset ticdata2000.txt use any method you

Relational Expressions: The Conditions in if statements use expressions which are theoretically, or logically, either true or false. These expressions are termed as relational

Need help with creating functions in matlab.

how can i model this eqn: solve n plot x vs v x^3-2x^2+x=v^2(.532*10^-3) by putting v=0 to 20 and find the change in x


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

How to calculate 2D/3D structure tensor of image

The Efficient Method: Though, in MATLAB, there is another built-in function which specifically produces random integers, i.e. randint. Calling the function with randint (1,1,n

can we use regression in bioinformatics toolbox?

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