FFT from a time signal with unequal time increment

5 views (last 30 days)
Hi everyone, I am trying to take a FFT from a simulated time signal, which is resulted from an ODE simulation. The problem is the unequal time steps by ODE and I don't know how should I make this FFT analysis in this case. Concerning the T as the time vector and Y as a simulated time signal, can anybody tell me how should I perform the FFT analysis? Many thanks in advance!

Answers (1)

Star Strider
Star Strider on 27 Jan 2016
I would go back and re-run the ODE with a fixed time step, then use that to calculate the FFT.
Instead of giving the ODE solver a ‘tspan’ vector of a beginning and end time, such as:
tspan = [t_start t_end];
give it a constant-step vector instead:
tspan = linspace(t_start, t_end, 50);
to create (for example) a 50-element equal-step time vector. The ODE solver will report the solutions very close to the time steps you specify.

Categories

Find more on Fourier Analysis and Filtering in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!