Filter löschen
Filter löschen

Integration in Simulink- output not as desired

1 Ansicht (letzte 30 Tage)
want2know
want2know am 30 Okt. 2013
Kommentiert: want2know am 31 Okt. 2013
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 Kommentar
want2know
want2know am 31 Okt. 2013
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

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Programming finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by