What does the output signal look like when you insert $2000 Hz$ square pulses to chebyshev filter with parameters: (Matlab syntax). I tried to do it like this but I don't understand where it goes wrong.
%Making the square pulses
Fs = 1000000;
t = [0:1/Fs:50e-4];
f = 2000;
%square pulse with 50% duty cycle
xt = 1*square(2*pi*f*t, 50);
%Making the filter
Wp = [1000 3000];
Ws = [100 3900];
[n,Wn] = cheb1ord(Wp,Ws,3,20,'s');
[b,a] = cheby1(n,3,Wn,'s');
%Filtering with the coefficient
xt_filtered = filter(b,a,xt);
%Plotting the filtered signal
plot(t,xt_filtered);
But I get something like this which doesn't make sense..?
Wp = [1000 3000]; Ws = [100 3900]; [n,Wn] = cheb1ord(Wp,Ws,3,20,'s'); [b,a] = cheby1(n,3,Wn);
What would be the correct syntax then? $\endgroup$ – ELEC Nov 20 '14 at 22:19