Info

この質問は閉じられています。 編集または回答するには再度開いてください。

How to declare a constant variable in Data Store Memory ?

1 回表示 (過去 30 日間)
David Morin
David Morin 2017 年 12 月 12 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
Hello,
In a Matlab Function Bloc, I initialize the output with the zero() function and a global variable :
global var
Output = zeros(var,1);
With var declared in a Data Store Memory bloc. My problem is that Output is inferred as a variable size vector, which it is not because var is a design parameter and thus is constant during simulation. Is there a way to specify Simulink that var doesn't change ?

回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by