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
Obtaining the Partial Fraction Expansion of the Z-Transform expression and to find its Inverse Z-Transforms using MATLAB

Finite Difference Method for An Elliptic Partial Differential Equation   Problem  Use the finite difference method and MatLab code to solve the 2D steady-state heat equat

The game of Simpli ed Poker is a simple game by today''s standards. You start o with a standard deck of cards, shue the cards, and then give each player 3 cards. Each card has a

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

RECOGNIZER and TRANSLATOR: i want to recognized devanagari word using matlab. I have done it using template matching. but i am not get devanagari word at the output. But get speci

From A to B the inlet valve is open and the steam pressure increases linearly from 0.1000 MPa absolute to 15.00 MPa absolute, 1000°C. The inlet valve closes and from B to C the

As shown in Figure 1, Ecosystem carbon (C) cycles in a tropical forest can be modeled using three "compartments":  aboveground (AG), belowground (BG), and soil organic matters (SOM

Example of Linear indexing: For illustration, the following substitutes the whole second row with values from a vector  The whole row or column could also be changed : >> m

Matlab Command Reference 1. Getting Help: The help command is used to find the functions and its syntax. Similarly, lookfor is used to find the functions or topics. For examp

Ft. Loudoun and Watts Bar are two large hydroelectric dams, the former upstream of the latter. The level of Watts Bar Lake must be kept within limits for recreational purposes, and