How can I demux a "From workspace" vector or array into individual constant blocks?

11 visualizaciones (últimos 30 días)
If I have a vector on my workspace
a = [1 0 1 1 0 1 1 1 0]
Is it possible to use the "From workspace" block in simulink to "deMux" the vector into multiple constants? So in this example I have 9 "Constant" blocks?

Respuesta aceptada

Fangjun Jiang
Fangjun Jiang el 9 de Dic. de 2021
Don't use the "From Workspace" block. Just use the Constant block, specify the value as "a" and then Demux.
  2 comentarios
william Dussault
william Dussault el 9 de Dic. de 2021
Thanks! It worked. So what's the point of having a "From workspace" block?
Fangjun Jiang
Fangjun Jiang el 9 de Dic. de 2021
"From Workspace" block can be used to import time-varying values. The data has to include a time vector.

Iniciar sesión para comentar.

Más respuestas (0)

Etiquetas

Productos


Versión

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by