Create Truth Table of Size according to input - MATLAB Cody - MATLAB Central

Problem 43487. Create Truth Table of Size according to input

Difficulty:Rate

Create a Truth Table

Example:

n = 3 output = [0 0 0; 0 0 1; 0 1 0; 0 1 1; 1 0 0; 1 0 1; 1 1 0; 1 1 1]

Solution Stats

47.17% Correct | 52.83% Incorrect
Last Solution submitted on Jul 19, 2025

Solution Comments

Show comments

Problem Recent Solvers46

Suggested Problems

More from this Author43

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!