Quantcast
Channel: Math.NET Numerics - Math.NET
Viewing all articles
Browse latest Browse all 224

FourierTransform to Graph

$
0
0

@DavidRutten wrote:

I can’t figure out how to draw the waveform for a Fourier transform frequency domain. As a test case I picked the reals {0.0, 0.5, 1.0, 2.5, 4.0, 2.0} and ran them through Fourier.Forward(Complex[]) with all imaginaries being zero, getting:

Magnitude, Phase
4.082,     0.000
2.208,     2.337
0.736,    -2.337
0.000,     0.622
0.736,     2.337
2.208,    -2.337

and

Real,     Imaginary
 4.082,   0.000
-1.531,   1.591
-0.510,  -0.530
 0.000,   0.000
-0.510,   0.530
-1.531,  -1.591

Assuming the original samples are placed at unit intervals, how do I figure out the y-value of the waveform at any real parameter? I.e. the blue curve:

(via BetterExplained)

Edit:
I’ve gotten close-ish by harvesting the magnitudes and phases of complex frequency vector (but only elements 1 to N/2, so I think I’m skipping all negative frequencies). But the final graph doesn’t intersect the sample points. It’s close, and I can see it bulging in the correct location when I adjust the samples, but even allowing for a corrective vertical scale+move I cannot get the graph to exactly intersect the points:

Posts: 3

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 224

Trending Articles