how to set data store variable as block parameter variable?

2 ビュー (過去 30 日間)
ecom
ecom 2021 年 10 月 31 日
編集済み: Fangjun Jiang 2021 年 11 月 10 日
Hello,
In simulink, I have created a variable Fr using the data scope memory block(also using data store read & write). How can I set this variable name Fr into sine wave block for frequency as Fr as parameter? I tried to create the parameter variable from the model editor but it ask for value. I deleted param field and write Fr there and I had to specify variable in the value which is empty [ ]. I tried writing =Fr in the value field but is not working.
Thank you

回答 (1 件)

Fangjun Jiang
Fangjun Jiang 2021 年 11 月 1 日
編集済み: Fangjun Jiang 2021 年 11 月 10 日
Use a Math function block. y=sin(2*pi*Fr*t), specify Clock multiplied by Fr as input and perform sin() function on it.
  1 件のコメント
ecom
ecom 2021 年 11 月 10 日
hi,
thanks i will try, was busy lately....

サインインしてコメントする。

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by