clc;
clear;
close all;
%%
Fs = 100 ; 
t = 0:1/Fs:100 ;
system = tf([1 1], [1 1 2]) ;
h = impulse(system , t) ;
Y = fft(h);
L = numel(h) ;
P2 = abs(Y/L);
P1 = P2(1:L/2+1);
P1(2:end-1) = 2*P1(2:end-1);
f = Fs*(0:(L/2))/L;
plot(f,P1)
title('Single-Sided Amplitude Spectrum of X(t)')
xlabel('f (Hz)');
ylabel('|P1(f)|');
xlim([0 , 1]);