Why does R2024b force my signals to be [1x1] vectors instead of scalars like they were in R2022a?

60 ビュー (過去 30 日間)
Richard Lavery
Richard Lavery 2024 年 11 月 11 日 21:44
回答済み: Ashok 約13時間 前
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
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
Ashok 約13時間 前
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:
I hope this will resolve the query!

カテゴリ

Help Center および File ExchangeSubsystems についてさらに検索

製品


リリース

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by