Scalar expansion for data store memory initialization simulink

1 次查看(过去 30 天)
I'm trying to use a Data Store Memory block in Simulink. I'd like to specify the dimensions and use scalar expansion to initialize the store, which the documentation describes as being possible. However, I keep getting an error that the dimensions of the initial value do not match the dimensions of the store, and the unhelpful tip to use "-1" to infer dimensions from the initial value.
I'm not sure what I'm doing wrong. What is the proper syntax for each field to get the scalar expansion behavior to kick in?

回答(1 个)

Akshat Dalal
Akshat Dalal 2025-3-2
Hi Thomas,
I believe this error could be because of the following scenario: You might have put the dimensions to "-1" and also selected scalar expansion but the intial value might be a scalar. If that's the case, then it is an expected issue since the dimensions inferred are that of a scalar value and the scalar expansion is of no use. The scalar expansion will kick in if you explicitly specify matrix dimensions instead of "-1". The error you're getting is probably due to a mismatch in the dimensions the DSM block calcluated(scalar) and the value being fed to it via Data store read/write blocks(matrix).

类别

Help CenterFile Exchange 中查找有关 Sources 的更多信息

标签

产品

Community Treasure Hunt

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

Start Hunting!

Translated by