Integration in Simulink- output not as desired

1 回表示 (過去 30 日間)
want2know
want2know 2013 年 10 月 30 日
コメント済み: want2know 2013 年 10 月 31 日
Dear Sir/Madam,
I know this is fairly simply, am trying to achieve something as below to be implemented in Simulink:
i want the following:
out(i) = out(i-1) + abs(signal(i-1) - signal(i))*(time(i)-time(i-1));
This is what I have tried, I have no idea what went wrong.
I used the integrator block in the Matlab. But, the output I got is:
out(i) = signal(i)*(time(i)-time(i-1));
I understand that my signal and time will be in discrete rather than analog.
Appreciate any suggestion, thanks
  1 件のコメント
want2know
want2know 2013 年 10 月 31 日
Dear Sir I have tried using the Unit Delay Blocks but still it didn't give the expected result. Where the inputs to Unit Delay Blocks are [0 1 2 3] for time and [5 5.1 5.2 5.2] for signal time signal(desired output in bracket) 0.0 20 (20) 1.0 5 (20.1) 2.0 5.1000 (20.2) 3.0 5.2000 (20.2) Please see the image for better view: http://imgur.com/OpipALP

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

回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by