I need to find nonzero elements in Simulink of a Boolean vector signal, for example:
Basically it comes from comparison of two signals. This can be done by a find block in Simulink but I am only using blocks in the "slcilib" (simulink code inspector library) for code certifiable reasons, and of course it does not contain a find block.
What I expect to have is the index vector itself, in this case [1 3], and I will feed this index vector to a selector block index port (this port does not support Boolean data type!), to select corresponding values of another signal and assign these values.
Is it possible to do it using only math and logic operations that are contained in the slcilib? Any clue would be helpful!