I have this example signal:
w1 = 3; (* rad/s *)
w2 = 50; (* rad/s *)
w3 = 4; (* rad/s *)
signal[t_] = Sin[w1*t] + Sin[w2*t] - Sin[w3*t]
I would filtrer this signal with ideal Low Pass filter (w3=50 rad/s) using command LowpassFilter
such that the filtered signal is:
signalF[t_] = Sin[w1*t] - Sin[w3*t]
I tried so:
data = Table[signal[t], {t, 0, 5, 0.01}];
wc=50;
n=200; (*What does it mean specifically this parameter?*)
ListLinePlot[LowpassFilter[data, 50, 200, DirichletWindow]]
but I got the same starting signal. What am I doing wrong?
Show[Plot[signal[t], {t, 0, 5}], ListLinePlot[LowpassFilter[data, 0.5/(2 Pi)], DataRange -> {0, 5}]]
? You need to take into account the sampling and2 Pi
of the sine. $\endgroup$LowpassFilter
: "LowpassFilter[data,Subscript[\[Omega], c]]
uses a filter kernel length and smoothing window suitable for the cutoff frequencySubscript[\[Omega], c]
and the input data" - I guessDirichletWindow
is default. What's more important, "By default,SampleRate->1
is assumed for images as well as data". $\endgroup$