logo for matrixlab-examples.com
[?] Subscribe To This Site

XML RSS
Add to Google
Add to My Yahoo!
Add to My MSN
Subscribe with Bloglines


Home
Matrixmania Blog
Contact
-> Sitemap <-
Matlab Books
Quick Matlab Guide
Matlab Tutorials
Matlab Examples
Matlab Flow Control
Boolean Algebra
Linear Algebra
Matlab 2D Plots
Matlab 3D Plots
Matlab GUI
Matlab Cookbook I
Matlab Cookbook II
Probability and Stats
Forums and Help
Relevant Links
Fun!
Your own Website?
Terms/Policies
leftimage for matrixlab-examples.com

Boolean Algebra



These are the four logical operators for Boolean Algebra in Matlab.
See the descriptions and click on the topic of your interest to see examples.

Boolean and Relational operators Summary
In Matlab, there are four logical (aka boolean) operators. These operators produce vectors or matrices of the same size as the operands, with 1 when the condition is true, and 0 when the condition is false...

Laws of Boolean Algebra
In the following axioms and theorems, the '+' or 'V' signs represent a logical OR (or conjunction), the '.' or '^' signs represent a logical AND (or disjunction), and '¬' or '~' represent a logical NOT ( or negation)...

De Morgan's Laws
In Boolean Algebra, there are some very important laws which are called the De Morgan's laws. These laws teach us how to interchange NOT with AND or OR logical operators...

Logical AND. See details and examples.
A & B performs a logical AND of arrays A and B and returns an array containing elements set to either logical 1 (TRUE) or logical 0 (FALSE).

Logical OR. See details and examples.
A | B performs a logical OR of arrays A and B and returns an array   containing elements set to either logical 1 (TRUE) or logical 0 (FALSE).

Logical EXCLUSIVE OR. See details and examples.
For the logical exclusive XOR(A,B), the result is logical 1 (TRUE) where either A or B, but not both, is nonzero.  The result is logical 0 (FALSE) where A and B are both zero or nonzero.

Logical NOT. See details and examples.
~A performs a logical NOT of input array A, and returns an array containing elements set to either logical 1 (TRUE) or logical 0 (FALSE).



From 'Boolean Algebra' to home


footer for boolean algebra page