SIMULINK

1 回表示 (過去 30 日間)
Antonia Lichtenegger
Antonia Lichtenegger 2011 年 3 月 23 日
ok my problem, in simulink, is that I have a function like:
df/dt=m*exp(f*V)
and V=[v1,...,vn] should be a vector and now I would like to calculat thees function for every vector entry and then get back the new vector.
How can I simulat this in Simulink?

採用された回答

Jarrod Rivituso
Jarrod Rivituso 2011 年 3 月 23 日
The Integrator block supports vector signals. So, try this...
1. Add an Integrator block to the model. Set the initial condition of the Integrator block to be a vector of n elements, one for each of the equations you'd like to integrate. The input to the Integrator is df/dt, and the output is f.
2. Calculate df/dt. To do this, you will have to use a Gain block to multiply f by a the V vector. By default, the Gain block will use element-wise multiplication, and so each equation would be multiplied by the correct v parameter.
Hope this helps!

その他の回答 (1 件)

Antonia Lichtenegger
Antonia Lichtenegger 2011 年 3 月 23 日
Thank you very much a lot it works!!
  1 件のコメント
Matt Tearle
Matt Tearle 2011 年 3 月 23 日
Can you please accept Jarrod's answer, so that we know this "case is closed"? Thanks!

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

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by