forum.alglib.net

ALGLIB forum
It is currently Mon Dec 06, 2021 3:04 pm

All times are UTC


Forum rules


1. This forum can be used for discussion of both ALGLIB-related and general numerical analysis questions
2. This forum is English-only - postings in other languages will be removed.



Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: real FFT from alglib
PostPosted: Tue Jun 29, 2021 2:36 pm 
Offline

Joined: Tue Jun 29, 2021 2:04 pm
Posts: 1
Hello guys,

So I am trying to implement PSD and CPSD (Power and Cross Power Spectral Density) functions in C++ using the FFT data. For that, I'm using ALGLIB's fft API. To check its results, I test it against MATLAB's fft, because I know it works.

But the results I had for both algorithms were quite different at the frequency peaks (as you can see from the figure attached)

FYI, I'm doing the fft in this function:
S = 0.7*sin(2*pi*50*t) + sin(2*pi*120*t);
From time 0 to 1.5s in 1000 points.

Do you guys know why the results are not the same? At first, I thought that ALGLIB does an automatically windowing in the signal, but I'm not sure though.

I appreciate all the help on this one. :)


Attachments:
File comment: at the peak frequencies, we can see the difference between both
untitled.png
untitled.png [ 43.49 KiB | Viewed 388 times ]
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group