Mathematical operation, MATLAB Programming

Mathematical operation:

For numerical operands, the use of such operators is clear-cut. For illustration, 3 < 5 means '3less than 5,' that is conceptually a true expression. Though, in MATLAB, as in many programming languages, the logical true is exhibited by the integer 1, and the logical false is presented by the integer 0. Therefore, the expression 3 < 5 really has the value 1 in MATLAB. Showing the result of expressions like this in the Command Window elaborates the values of the expressions.

>> 3 < 5

ans =

1

>> 9 < 2

ans =

0

Though, in the Workspace Window, the value revealed for the result of these expressions would be true or false. The kind of the result is logical.

The Mathematical operations could be executed on the resulting 1 or 0.

>> 5 < 7

ans =

1

>> ans + 3

ans =

4

Posted Date: 10/18/2012 7:29:29 AM | Location : United States







Related Discussions:- Mathematical operation, Assignment Help, Ask Question on Mathematical operation, Get Answer, Expert's Help, Mathematical operation Discussions

Write discussion on Mathematical operation
Your posts are moderated
Related Questions
I have a file to be read in matlab which carries different columns in it. Each column has around 200000 readings in set of 2000. I want a code in a loop which gives stores each col

Illustration of a built-in function: The length function is an illustration of a built-in function which computes a single value; it returns the length of a vector. As an illu

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

Create a Super Mario Brothers game in Matlab. The lines of codes do not matter. But, The requirements are: REQUIREMENTS: Modular design and implementation Algorithm docu

1) Convert the table into format convenient for the processing with MATLAB. 2) Prepare a program that perform K Nearest Neighbours algorithm using Euclidian distance. (Your prog

(a) Find the spectrum of this waveform:  x = [ exp( -[0:1:49]/10), exp(-[50:-1:1]/10)]. Subplot only the magnitude by using the spectrum program from the class notes. (b) Using

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 in variables statements: Error: The expression in the left of equals sign is not a valid target for an assignment. >>  By placing a semicolon at the end of the sta

(a) Using Matlab, find and plot the magnitude of the DTFT of 10 samples of x(n) for n=[0:1:9] of x(n) = cos(2*pi*f1*n) + cos(2*pi*f2*n)  for f1=0.22 and f2=0.24 and pad zeros to ge