Illustration to logical function , MATLAB Programming

Illustration to logical function:

In addition to such logical operators, the MATLAB also has a function xor, that is the exclusive or function. It returns the logical true if one of the arguments is true. For illustration, in the subsequent only the first argument is true,therefore the answer is true:

>> xor(3 < 5, 'a' >  'c')

ans =

1

In this illustration, both the arguments are true therefore the result is false:

>> xor (3 < 5, 'a' < 'c')

ans =

0

Given that the logical values of true and false in variables x & y, the truth table shown below explains how the logical operators work for all the combinations. Keep in mind that the logical operators are commutative (example, x || y is similar as y || x).

742_logical operators1.png

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







Related Discussions:- Illustration to logical function , Assignment Help, Ask Question on Illustration to logical function , Get Answer, Expert's Help, Illustration to logical function Discussions

Write discussion on Illustration to logical function
Your posts are moderated
Related Questions
Example of Printing vectors: For vectors & matrices, even though formatting cannot be specified, the disp function may be simpler to use in common than fprintf as it displays

Writing data to a File: The save function can be used to write a data from the matrix to the data file, or to append a data file. The format is as shown below: save filenam

i am doing my project on matlab and the topic of my project is invisible watermarking.How we can extract all pixel values of image in binary form.

Operators: There are in general two types of operators: unary operators that operate on a single value or operand; and binary operators, that operate on two values or operands

Write a MATLAB program to find the undamped natural frequencies and modes of an electric car treating it as a four degree of freedom system. Determine the undamped natural frequenc

1) Identify an equation that describes some chemical process.  Your equation should have at least two parameters, at least one of which should contribute in a non-linear way. He

Your Task: Write an M-function that computes simple returns as formula (1). Use this function to calculate the daily returns for each index. Using MATLAB build-in functions estimat

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

You are asked to create an american option multiplicative binomial model calculator in MatLab. Both put and call options should be valued. Given u, d, S 0 , K, r, and T (the usual

what is matlab