From frequency to time domain

1 回表示 (過去 30 日間)
Nicolò Monaco
Nicolò Monaco 2022 年 2 月 17 日
コメント済み: Jon 2022 年 2 月 18 日
I have the function S, representing the sea elevation spectrum in frequency domain.
S= 300x365 , being the spectra for 365 days in 300 frequency timestep.
I want to translate the function to time domain, simulating S for every second in a day (86400s).
How can I implement this?
thank you in advance.

採用された回答

Jon
Jon 2022 年 2 月 17 日
If I understand what you are asking for correctly I am assuming that your matrix S has the fft of the original time domain data.
I think you could then recover it and interpolate to get data for every second in the day using:
% make time vector for original spacing (300 samples per day)
t = linspace(0,86400-1,300);
% recover time domain signal
X = ifft(S);
% interpolate intermediate values
tq = 0:86400-1;
Xq = interp1(t,X,tq)
  3 件のコメント
Nicolò Monaco
Nicolò Monaco 2022 年 2 月 18 日
Thank you for your answer. My problem was that the spectrum is not directly derived by an fft but you provide me a feasible solution.
Jon
Jon 2022 年 2 月 18 日
Glad that you were able to make progress

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeTransforms についてさらに検索

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by