MATLAB: How to input logical value to From Workspace Block

from workspace blocksimulink

Logical Operator Block successfully reads input data from Constant Block, for example [1 0 1]. But it doesn't read the same massive from workspace. How to input logical value to From Workspace Block in correct form?

Best Answer

If you want to use a=[1 0 1] as a constant, then use constant block. To use it as a signal you can use a from workspace block. In this case like indicated in the help, the first element of each row correspond to a time stamp. You can write for example
a=[0 1 0 1];
The first element of a corresponds to a time 0. the output will be [1 0 1]