How to hold variable in simscape?

Hello! I need to get the value of changing the variable relative to the start of the simulation (i'm creating custom block in simscape language). For example, I - input signal (I=sin(simulation time)+10), O - output, H - internal variable (H= sqrt(I^2+I^2)/2); i need to get O=H-H(initial) - in my example = 7.1). I tried: v == H.der; O.der == v; It doesn't works. The only way i found is to output H, use hold scheme by simulink components (switch+clock+memory) and input H value at zero time; but i want to do this in the simscape block internally.

2 件のコメント

Birdman
Birdman 2017 年 11 月 15 日
Can you share the model(export to r2017a)?
Sergey Papkov
Sergey Papkov 2017 年 11 月 15 日
y, of course

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

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeFoundation and Custom Domains についてさらに検索

質問済み:

2017 年 11 月 15 日

コメント済み:

2017 年 11 月 15 日

Community Treasure Hunt

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

Start Hunting!

Translated by