Calculate the Fourier transform of the filter from the signals.
t = ...
s = ...
s_filtered = ...
Ts = mean(diff(t));
Fs = 1/Ts;
Fn = Fs/2;
L = numel(t);
FTs = fft(s)/L
FTs_filt = fft(s_filtered)/L;
Fv = linspace(0, 1, fix(L/2)+1)*Fn;
Iv = 1:numel(Fv);
H = FTs_filt ./ FTs;
figure
subplot(2,1,1)
plot(Fv, abs(H(Iv)))
ylabel('Amplitude')
grid
subplot(2,1,2)
plot(Fv, angle(H(Iv)))
xlabel('Frequency')
ylabel('Phase')
grid
sgtitle('Bode Plot of Filter')
That should reveal the filter characteristics, as well as reasonably accurate aspects of its design (e.g. passband and stopband frequencies).
Best Answer