フィルターのクリア

Info

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

Need help saving an array into a variable and using that variable during the same simulation.

2 ビュー (過去 30 日間)
rami ghali
rami ghali 2018 年 3 月 8 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
Hello,
So I am trying to register a specific number or array during a simulation and assign it to a variable which I can use during the same simulation. Using the TO WORKSPACE does not help my problem as the data will be saved and can be used in the next simulation when the current simulation is stoped. It would be great if someone can help me with that. what are my options ? would s function help?

回答 (1 件)

Walter Roberson
Walter Roberson 2018 年 3 月 8 日
編集済み: Walter Roberson 2018 年 3 月 8 日
Put it into a signal that you attach as needed, or register global data. https://www.mathworks.com/help/simulink/ug/using-global-data-with-the-matlab-function-block.html
  4 件のコメント
rami ghali
rami ghali 2018 年 3 月 9 日
I mean when I use the variable that I have stored in the data memory lets say Its called A. If I use this A anywhere lets say in the frequency of a PWM generator block. I get an error that A is not defined
Walter Roberson
Walter Roberson 2018 年 3 月 9 日
Is this intended to be something that varies with time? Or is it something that you calculate once and then remains unchanged until the end of the simulation? If it is calculated once then can it be calculated at initialization time?

この質問は閉じられています。

Community Treasure Hunt

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

Start Hunting!

Translated by