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 LowpassFiltersuch 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 Piof the sine. – corey979 Nov 19 '16 at 13:35but why wc=0.5/(2pi)? ... if my wc=50 rad/sec. Maybe wc in the command is not a pulsation but frequency w/(2pi)? If yes, why 0.5? Furthermore why without DirichletWindow? Thx
– plus91 Nov 19 '16 at 13:47LowpassFilter: "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 guessDirichletWindowis default. What's more important, "By default,SampleRate->1is assumed for images as well as data". – corey979 Nov 19 '16 at 14:26LowpassFilterseems to be improved (or even bug-fixed?) in v11 or earlier, in v9 I have to manually adjust the 3rd argument of it to obtain a reasonable result: http://i.stack.imgur.com/sABt7.png – xzczd Nov 20 '16 at 06:56n=200; (*What does it mean specifically this parameter?*)", so you found this code piece somewhere else? – xzczd Nov 20 '16 at 06:58LowpassFilter?" – xzczd Nov 20 '16 at 10:58