use PDL; use PDL::Types; use PDL::Func; use PDL::Math; use warnings; use strict; sub new { return (bless { _signals => ['time', 'input'], _parameters => ['count'] })->create(@_); } sub calc { my ($this, $dim, $time, $input, $count) = @_; my $KDT = 62.9; my $MDT = 0.6; my $inputdelay = $this->delay('inputstate', $input); my $output = $KDT*($input-$inputdelay)+(1+$MDT); return ($output) } sub init { my ($this) = @_; my $count = $this->{count}; $this->initdelay('inputstate', zeroes($count)); return 0; }