No BSD License  

Highlights from
Truth Table Matrix Generator

1.0

1.0 | 2 ratings Rate this file 6 Downloads (last 30 days) File Size: 1.17 KB File ID: #13117

Truth Table Matrix Generator

by Torsten Geiss

 

25 Nov 2006 (Updated 27 Nov 2006)

Calculates the binary truth table of n possibilities.

| Watch this File

File Information
Description

Returns the binary truth table of n possibilities.

Acknowledgements

The author wishes to acknowledge the following in the creation of this submission:
Switching Function Generator
This submission has inspired the following:
TRUTH TABLE

MATLAB release MATLAB 7.1.0 (R14SP3)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (2)
27 Nov 2006 Jos x@y.z

The lack of pre-allocation make this pretty slow. Moreover it errors on certain input (e.g., 5). And what is the use of this function if nb_possibles is not a power of 2?

27 Nov 2006 John D'Errico

Why use a slow, un-preallocated, unvectorized code, when there is a one-liner available?

dec2bin(0:(nb_possibles-1))=='0'

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
truth Torsten Geiss 22 Oct 2008 08:50:16
table Torsten Geiss 22 Oct 2008 08:50:16
truthtable Torsten Geiss 22 Oct 2008 08:50:16
possibilities Torsten Geiss 22 Oct 2008 08:50:17
binary Torsten Geiss 22 Oct 2008 08:50:17
matrix Torsten Geiss 22 Oct 2008 08:50:17
boolean Torsten Geiss 22 Oct 2008 08:50:17

Contact us at files@mathworks.com