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
Creating Matrix Variables: Creating a matrix variable is actually just a generalization of creating a row and column vector variables. That is, the values within the row are s

I need this task to be done with discription of matlab coding.

Produce a random real number: To produce a random real number in the range from low to high, at first create the variables low and high. And then, use the expression rand*(hig

The mass of the spring-mass-damper system shown below was initially displaced by 1 meter to the right and then released. The subsequent acceleration of the mass was measured using

Consider the analytic solution of the projectile problem described. Write a MATLAB script that will prompt the user to enter the launch speed and angle, and will compute the peak h

i want to extract an image from its background in matlab..the image is a binary image

Calling an User-Defined Function from Script: Now, we will change our script which prompts the user for the radius and computes the area of a circle, to call our function cal

User-Defined Functions which return a Single Value: We have seen the use of many functions in the MATLAB. We have used many built-in functions like fix, sin, abs, double, and

A filter described by the equation:    y(n) = x(n) + x(n-1) + 0.9 y(n-1) - 0.81 y(n-2) (a) Find the transfer function H(z) for the filter and find the poles and zeros of the fil