New answers tagged

5

I do not use the Wolfram Language at Wolfram Alpha since the syntax is a little different and I have access to Wolfram Mathematica which I prefer to Wolfram Alpha. If you have Wolfram Mathematica, then you use one of the Wolfram language commands, called FourierCoefficient to generate $a_n$ and $b_n$ as follows. (You can try these commands at Wolfram Alpha, ...


0

Try this Collect[A, Sin[_ ϕ - _] | Sin[_ ϕ + _] | Sin[_ ϕ] | Sin[ϕ - _] | Sin[ϕ] | Sin[ϕ + _]]


0

Some commenters mentioned that the strange expression that Mathematica gives as a Fourier transform of Exp[\[Lambda] z]/\[Lambda] is a bug. If you are curious what the actual Fourier Transform is, you may find some insights in the related questions (e.g. link).


2

Actually, LowpassFilter is pretty easy to use, if you understand the parameters it needs. For instance, replacing the OPs line with fnfilt = LowpassFilter[fn, 140, 200, SampleRate -> 1000]; gives exactly what you would expect. ListPlot[fnfilt, Joined -> True, PlotRange -> {{0, 1000}, All}] fnfiltft = Abs@Fourier@fnfilt; fnfiltftnormed = Table[...


1

I choose a simple Butterworth filter and show, based on the spectra, how it works. Cutoff frequency and filter order can be set. ubdat = 50; ws = 10*{2, 5, 10, 20, 40}; fn = Table[Sum[Sin[w*x], {w, ws}], {x, 0, ubdat, 0.001}]; Manipulate[ filter = ButterworthFilterModel[{"Lowpass", filterOrder, cutoffFreqency}]; discreteFilter = ToDiscreteTimeModel[...


1

I've found that specifying the kernel filter length in LowpassFilter will give the better performance than leaving it unspecified. I'll show what I came up with. Note that I've modified your problem somewhat. I use Fourier with the FourierParameters set for "signal processing". I renamed some of your variables for clarity. I also shortened the length of the ...


1

As MarcoB remembered I have looked at this before and concluded that LowpassFilter is for image processing not for signal processing. Lets go through your example with random noise and see what we get. I start by making some random noise with zeros before and after. sr = Round[1/0.001]; fn = Join[ConstantArray[0, 500], RandomReal[{-1, 1}, 49000], ...


3

I could not make LowpassFilter work for one-dimensional time histories either. I suggest you use a Butterworth filter which is more standard. Also I like to use random for testing because you can look at the transfer function. For the test below I add a few zeros at the end of the random to allow for filter ringing. Here is your code modified for random. ...



Top 50 recent answers are included