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

  • Home
  • SEARCH
  • 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 8062623
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T10:43:56+00:00 2026-06-05T10:43:56+00:00

Is there a function or package in R for calculating the Sliding FFT of

  • 0

Is there a function or package in R for calculating the Sliding FFT of a sample? By this I mean that given the output of fft(x[n:m]), calculate fft(x[1+(n:m)]) efficiently.

Ideally I’d find both an online version (where I don’t have access to the full time series at the beginning, or it’s too big to fit in memory, and I’m not going to try to save the whole running FFT in memory either) and a batch version (where I give it the whole sample x and tell it the running window width w, resulting in a complex matrix of dimension c(w,length(x)/w)).

An example of such an algorithm is presented here (but I’ve never tried implementing it in any language yet):

http://cnx.org/content/m12029/latest/

If no such thingy exists already in R, that doesn’t look too hard to implement I guess.

  • 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. Editorial Team
    Editorial Team
    2026-06-05T10:43:57+00:00Added an answer on June 5, 2026 at 10:43 am

    As usually happens when I post something here, I kept working on it and came up with a solution:

    fft.up <- function(x1, xn, prev) {
      b <- length(prev)
      vec <- exp(2i*pi*seq.int(0,b-1)/b)
      (prev - x1 + xn) * vec
    }
    
    # Test it out
    x <- runif(6)
    all.equal(fft.up(x[1], x[6], fft(x[1:5])), fft(x[2:6]))
    # [1] TRUE
    

    Still interested to know if some library offers this, because then it might offer other handy things too. =) But for now my problem’s solved.

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

Sidebar

Related Questions

Is there a function/package available in DB2 9.5 to calculate MD5 hash? Something similar
I was wondering if there is a package or generic function in R that
I'm wondering if there's an idiomatic one-liner or a standard-distribution package/function that I can
Is there a function that given a vector of numbers, returns another vector with
Is there some function/procedure/package that validates a username and password in Oracle (from a
I'm attempting to call a function in the ROOT plotting package that accepts three
Is there any function in clojure which calculates the boolean value of the given
Is there a function in Apple's library that can reverse the order of the
Is there a function in javascript that compares a string and returns a boolean?
Is there a function in c# that takes two 32 bit integers (int) and

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.