- 1

- 0

output(t) = (d/dt)*input(t)

Find the transfer function by taking the Fourier transform of both sides and rearranging (F = Fourier transform):

F[ output(t) ] = F[ (dinput/dt ]

F[ (dinput/dt ] = 2*pi*i*f * F[ input(t) ]

therefore:

F[ output(t) ] = 2*pi*i*f * F[ input(t) ]

and our transfer function, F[output(t)] / F[input(t)] = 2*pi*i*f = H(f)

The final system is:

output(t) = F

^{-1}[ 2*pi*i*f * F[ input(t) ] ]

The code that I'm implementing in Matlab is posted below seems to work correctly if the input function is sin or cos, but for x

^{2}(which should yield 2x as the output) doesn't work (also note that I'm having some issues with getting scaling right, but I'm not to worried about this at the moment) Any ideas?

Code:

```
%parameters
L_duration_s=1.0; %sampling duration, L
N_time_bins=1024; % # samples
delta_t=L_duration_s/N_time_bins;
time_s=0:delta_t:(N_time_bins-1)*delta_t;
delta_f=1/L_duration_s;
f_ny=(N_time_bins/2)*delta_f;
time_f=-f_ny+(N_time_bins-1)*delta_f:-delta_f:-f_ny;
i_=sqrt(-1);
%pinput waveform
x_t=cos(2*pi*time_s); %sin->cos
%cos->-sin
%fourier transform of input
x_f=(1/N_time_bins)*fft(x_t);
%xfer function
H_f=(1/N_time_bins)*((2*i_*pi).*time_f);
H_t=ifft(H_f);
%calculation of output
y_f=H_f.*x_f;
y_t=N_time_bins* ifft(y_f);
```