Constant block doesn't accept array
이전 댓글 표시

Not sure why the constant block doesn;t give the output as array. Is there any to make it possible?
채택된 답변
추가 답변 (2개)
Jim Riggs
2022년 10월 28일
2 개 추천
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
2022년 8월 24일
0 개 추천
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
madhan ravi
2022년 8월 24일
편집: madhan ravi
2022년 8월 24일
Abderrahim. B
2022년 8월 24일
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
2022년 8월 24일
Abderrahim. B
2022년 8월 24일
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
2022년 8월 25일
카테고리
도움말 센터 및 File Exchange에서 Subsystems에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

