Build a modified truth table of several variables

2 次查看(过去 30 天)
Hi,
I would like to generate a "truth table" in which are present only certain configurations. Moreover, the truth table must be build block by block where each block has different dimension. As example, if I have two variables x,y of cardinality 2,3 then I need to build the truth tables as: if true x -> 0 1 1 0 end if true y -> 0 0 1 0 1 0 1 0 0 end the final truth table is the composition of the previous one: 0 1 0 0 1 0 1 0 1 0 0 1 1 0 0 1 0 0 0 1 1 0 0 1 0 1 0 1 0 0 I have no idea about I can do it in efficient way. I thought about a variable number of nested loop to build the table. Thank you for help.

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Logical 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by