MATLAB Function ブロックをフィードバックさせて演算をさせたい
Ältere Kommentare anzeigen
SimulinkのMATALB Functionブロックを使って以下のようなことをしたいです。
入力:u = a (From Workspaceから読み込み)
出力:y = a + y[t-1]
もちろん、Delayブロックを用いれば簡単にできますが、MATLAB functionブロックを用いてコードを書くにはどのようにしたらよいでしょうか?
for文を使うのはわかるのですが、どのように書いたらいいのかわかりません。
初心者で稚拙な質問で大変申し訳ございません。
ご回答よろしくお願いいたします。
Akzeptierte Antwort
Weitere Antworten (1)
Kimiyasu Sasaki
am 20 Sep. 2019
0 Stimmen
1 Kommentar
Shoumei
am 20 Sep. 2019
persistent変数を2つ使ってください。
Kategorien
Mehr zu Simulink Function finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!