Constant block doesn't accept array
Mostrar comentarios más antiguos

Not sure why the constant block doesn;t give the output as array. Is there any to make it possible?
Respuesta aceptada
Más respuestas (2)
Jim Riggs
el 28 de Oct. de 2022
2 votos
Yes, you can save the value to the workspace and reference it in a constant block. As @Paul points out, the label on the Goto block has nothing to do with the workspace variable name.
The "To Workspace" block saves the variable in structure "Out", and has several options for the variable format.
Below, I show a reference to variable "B" saved to the workspace as an array and as a Time Series. This option is selected in the properties of the "To Workspace" block.

Abderrahim. B
el 24 de Ag. de 2022
0 votos
Hi!
I understood that you want the output of the constant block to have the same size as the array in it.
Use the constant block from DSP System Toolbox/ Sources.
Hope this helps
5 comentarios
madhan ravi
el 24 de Ag. de 2022
Editada: madhan ravi
el 24 de Ag. de 2022
Abderrahim. B
el 24 de Ag. de 2022
One more option is to deselect Interpret vector parameters as 1-D. Open the block dialog box, in the tab Main you will find this.
madhan ravi
el 24 de Ag. de 2022
Abderrahim. B
el 24 de Ag. de 2022
Tried at my end.. multiplied the generated const array with its transpose and it worked just fine. What kind of calculations you re doing?
madhan ravi
el 25 de Ag. de 2022
Categorías
Más información sobre Subsystems en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

