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
Two cars started to move from zero position with (φ = 35) as shown. For the next four minutes, do the following: 1. Calculate each car's distance from the zero position (Distanc

a. Run the simulation you developed for 10 one-day periods. Provide a table of the Peak Power required for each day. b. Based on this information, and the fact additional capaci



Problem 1.  Use Matlab to solve the following system of linear equations: 2x + y + 3z = 1 2x + 6y + 8z = 3 6x + 8y + 18z = 5 Capture Matlab code and the result in a text fi

Error-Checking user input in the While Loop: In many applications, whenever the user is prompted to enter anything, there is a valid range of values. When the user enters a wr

draw midpoint circle by 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

Simulation of a transmission system with a 4-fsk modulation scheme; using non-coherent detection method and an awgn channel. System description: 1. Input: A. Random binary

Referring to and Modifying Elements: The particular element in a vector is accessed by using the name of the vector variable and the element number (or subscript, or index) in