Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 53157
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T17:01:10+00:00 2026-05-10T17:01:10+00:00

Trying to understand an fft (Fast Fourier Transform) routine I’m using (stealing)(recycling) Input is

  • 0

Trying to understand an fft (Fast Fourier Transform) routine I’m using (stealing)(recycling)

Input is an array of 512 data points which are a sample waveform. Test data is generated into this array. fft transforms this array into frequency domain. Trying to understand relationship between freq, period, sample rate and position in fft array. I’ll illustrate with examples:

========================================

Sample rate is 1000 samples/s. Generate a set of samples at 10Hz.

Input array has peak values at arr(28), arr(128), arr(228) … period = 100 sample points

peak value in fft array is at index 6 (excluding a huge value at 0)

========================================

Sample rate is 8000 samples/s Generate set of samples at 440Hz

Input array peak values include arr(7), arr(25), arr(43), arr(61) … period = 18 sample points

peak value in fft array is at index 29 (excluding a huge value at 0)

========================================

How do I relate the index of the peak in the fft array to frequency ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T17:01:10+00:00Added an answer on May 10, 2026 at 5:01 pm

    If you ignore the imaginary part, the frequency distribution is linear across bins:

    Frequency@i = (Sampling rate/2)*(i/Nbins).

    So for your first example, assumming you had 256 bins, the largest bin corresponds to a frequency of 1000/2 * 6/256 = 11.7 Hz. Since your input was 10Hz, I’d guess that bin 5 (9.7Hz) also had a big component. To get better accuracy, you need to take more samples, to get smaller bins.

    Your second example gives 8000/2*29/256 = 453Hz. Again, close, but you need more bins. Your resolution here is only 4000/256 = 15.6Hz.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 158k
  • Answers 158k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Use, result=(int)reader[0]; May 12, 2026 at 11:14 am
  • Editorial Team
    Editorial Team added an answer How malicious are your users? Really. Exactly how malicious? If… May 12, 2026 at 11:14 am
  • Editorial Team
    Editorial Team added an answer Firstly, 3:0 parses like (3:) (0), i.e. the monad "3:"… May 12, 2026 at 11:14 am

Related Questions

Trying to understand an fft (Fast Fourier Transform) routine I'm using (stealing)(recycling) Input is
I'm creating an epub file and am trying to understand an example css for
I've received some documentation from one of our suppliers for a webservice they're publishing
I have for the last several years been struggling to understand why the Internet
Just trying to understand how to address a single character in an array of

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.