Example of variables and assignment statements, MATLAB Programming

Example of Variables and assignment statements:

The expression is computed and then that value is stored in the variable. For illustration, this is the way it would appear in the Command Window:

>> mynum = 6

mynum =

6

>> 

Here, the user typed mynum = 6 at prompt, and the MATLAB stored integer 6 in the variable known as mynum, and then exhibit the result followed by the prompt again. As the equal sign is an assignment operator, and it does not mean equality, the statement must be read as 'mynum gets the value of 6' (not 'mynum equals 6').

Note that the variable name should always be on the left, and the expression on the right side. An error will take place if these are reversed.

>> 6 = mynum

??? 6 = mynum

 

Posted Date: 10/18/2012 3:24:14 AM | Location : United States







Related Discussions:- Example of variables and assignment statements, Assignment Help, Ask Question on Example of variables and assignment statements, Get Answer, Expert's Help, Example of variables and assignment statements Discussions

Write discussion on Example of variables and assignment statements
Your posts are moderated
Related Questions

i want the MATLAB code for properties of refrigerant R134a, Pentane and VCR Refrigeration cycle. Thanks

You are given data similar to the examples and sample problems in the statistics topic. Write MATLAB program to do the following: 1. Plot histogram, relative frequency histogram

Read the document and quote me ... https://www.dropbox.com/s/pvq4f45fpwajibi/Course_wk%20_2013_.pdf

An FIR filter has coefficients b = [ 1.0000   -0.6387    1.0214    0.8210   -0.7470    1.0920 ] (a) Find H(z) for the filter and plot its frequency response (magnitude and phase

MATLAB is a high-performance language for technical computing. It integrates computation, visualization, and programming in an easy-to-use environment where problems and solutions

Implement a single-layer perceptron and train it to translate the digital letters given in the file "pattern1" into the corresponding ASCII representation. Plot a training curve an

The Programming Concept: In most of the programming languages, random function returns a real number; therefore the real number would then have to be rounded to produce a rand

matlab code for path and adjancy martix between pixels