Why does R2024b force my signals to be [1x1] vectors instead of scalars like they were in R2022a?
조회 수: 65 (최근 30일)
이전 댓글 표시
I can't understand why my signals are showing up as [1x1] vectors after moving from Simulink R2022a to Simulink R2024b. I should not have to place a Resize block after every one of these signals to get it to report as scalar values. Is there a high level model setting that I need to change?
The signal that I'm reading in from the workspace is of demension 1x2048. I tried taking the transpose and there is no difference.
This is what I always had with R2022a:
This is what I have now with R2024b:
댓글 수: 1
Paul
2024년 11월 11일 22:24
Hi Richard,
The block named "Signal From Workspace" looks like it's a masked subsystem (based on the down arrow in the lower left corner). Hard to know much more w/o seeing what's inside that subsystem.
답변 (1개)
Ashok
2024년 11월 20일 4:26
The distinction between scalar signals and 1x1 vector signals in the Signal Dimensions information overlay was introduced in R2024a. The output signal of the Signal From Workspace block has consistently been a 2D vector across all versions. This can be verified by attaching a Check Signal Attributes block to the output of the Signal From Workspace block in R2022a as shown below.
The Check Signal Attributes block is used to verify signal dimensions in Simulink. It will terminate the simulation with an error if the input characteristics don't match the specified block parameters. No error in the Diagnostic Viewer indicates that the output signal from the Signal From Workspace block was a 2D 1x1 vector even in R2022a.
Since the signal dimensions are consistent between R2022a and R2024b, with only the information overlay updated, migrating from R2022a to R2024b should be smooth. The additional Reshape block may not be necessary.
For more information on the Check Signal Attributes block, refer to the following documentation pages:
- R2022a: https://www.mathworks.com/help/releases/R2022a/dsp/ref/checksignalattributes.html
- R2024b: https://www.mathworks.com/help/releases/R2024b/dsp/ref/checksignalattributes.html
I hope this will resolve the query!
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Subsystems에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!