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
please send the matlab program to find mean,variance,standard deviation and kurtosis for a set of values?

#quest121ion..

Micro-mouse is an engineering design competition created by IEEE in the late 1970s. Small robotic "mice" solve a 16x16 cell maze. The mice are completely autonomous and must find t

Your functions will allow you to create the following graph, which contains a piecewise function where a line exists in the first interval, a parabola in the second interval, and t

Various commands for get the help: There are various commands which can serve as an introduction to MATLAB and allow you to get the help: info will show contact informatio

(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

Solution by using pdepe function functionpdex1 m = 0; x = linspace(0,1,100); t = linspace(0,0.2,10);   sol = pdepe(m,@pdex1pde,@pdex1ic,@pdex1bc,x,t); % Ext

2)''dbcont'' command for debugging is used to Select one: a. Continue normal code execution from the debug prompt. b. List all breakpoints. c. Execute (step) one or more lines

There are many approaches to numerically estimating the derivative of the function.  The relationship:   is called a forward difference, since the estimate of the derivativ

Function definitions: There are various ways to organize the scripts and functions, but for now every function which we write will be stored in a separate M-file, that is why