FFT from a time signal with unequal time increment
조회 수: 3 (최근 30일)
이전 댓글 표시
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!
댓글 수: 0
답변 (1개)
Star Strider
2016년 1월 27일
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.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Ordinary Differential Equations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!