Function To Generate Truth Table Condition Vectors

This function efficiently generates a matrix of binary condition vectors for use in a truth table.

Download
Download

You are now following this Submission

Cite As

Paul Metcalf (2026). Function To Generate Truth Table Condition Vectors (https://uk.mathworks.com/matlabcentral/fileexchange/30008-function-to-generate-truth-table-condition-vectors), MATLAB Central File Exchange. Retrieved .

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.7.0

Further minor refinement of code.

Download
1.6.0

The submission is updated to correct performance issues accidentally introduced in the previous version, as well as address the comments of James Tursa.

Download
1.4.0

Added screenshot to download page.

Download
1.3.0

The algorithm is now up to 33% faster thanks to the excellent 'Guideline on writing clean and fast code in MATLAB' by Nico Schlömer.
This should now be the simplest, fastest and most direct way of generating a truth table in MATLAB.

Download
1.1.0

Slightly updated function description.

Download
1.0.0

Download