Variable-time FFT in Simulink

I have a Simulink model that works in variable-time steps. I am comparing the output of it to a model with discreet time steps. I want to look at an fft of both models and compare. To do so, I want to change the variable data into discreet.
Is there a way I can do this interpolation?
One idea I had was to set a sample time in the 'ToWorkspace' block. This adds quite a bit of time to the simulation (which I don't understand since I only want to save a very small chunk at the end of the sim).

 채택된 답변

Darren
Darren 2012년 1월 24일

0 개 추천

I came up with a less than elegant but effective method to solve this problem.
First I run a simulink model and export variable-time data to matlab. I then pass this data to another simulink model that has a 'FromWorkspace' which essentially transforms the variable-time data to a discreet sampling time that I can specify in the simulations parameters. Then I export it back out to matlab.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Fourier Analysis and Filtering에 대해 자세히 알아보기

제품

태그

질문:

2012년 1월 24일

Community Treasure Hunt

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

Start Hunting!

Translated by