フィルターのクリア

Units for define max, min and sampling frequency

3 ビュー (過去 30 日間)
Luis Jesús Olvera Lazcano
Luis Jesús Olvera Lazcano 2023 年 9 月 13 日
コメント済み: William Rose 2023 年 9 月 13 日
I have been using a bandpass for my netcdf data, to have 30-80 day frequency.
Although Ive noticed until now that maybe Ive been putting the frequencies in the incorrect units:
frecuencia_min = 1 / 80; % Min frequency (cycle/day)
frecuencia_max = 1 / 30; % Max frequency (cycle/day)
% olr having 180x51x136, but for only an example olr has 1x1x136, being the
% last one the time dimension
olr_real(1,1,:) = bandpass(squeeze(olr_1(1,1,:)),[frecuencia_min frecuencia_max],1); % data is daily so fs=1
Are the units correct for the three frequencies?
Thanks! :)

採用された回答

William Rose
William Rose 2023 年 9 月 13 日
You call bandpass() as folows:
frecuencia_min = 1 / 80; % Min frequency (cycle/day)
frecuencia_max = 1 / 30; % Max frequency (cycle/day)
yfilt=bandpass(y,[frecuencia_min frecuencia_max],1);
This specifies that the sampling rate is 1 sample per unit time, and the filter cutoff frequencies are frecuencia_min and frecuencia_max cycles per unit time.
Therefore, if your data are sampled at 1 per day, then your cutoff frequencies are correctly specified.
  2 件のコメント
Luis Jesús Olvera Lazcano
Luis Jesús Olvera Lazcano 2023 年 9 月 13 日
Thank you very much!!
I have another question. Im doing the bandpass on 3D data as I mentioned before. Therefore I use a for cycle to filter each point of the grid as it follows
for i=1:length(lon)
for j=1:length(lat)
olr_real(i,j,:) = bandpass(squeeze(olr_1(i,j,:)),[frecuencia_min frecuencia_max],1); % data is daily so fs=1
fprintf('[%d] y [%d]\n',i,j);
end
end
Is this correct?
William Rose
William Rose 2023 年 9 月 13 日
@Luis Jesús Olvera Lazcano, that looks good to me. I assume you have initialized olr_real with a command suich as below.
olr_real=zeros(size(olr_1)); % initialize olr_real

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGet Started with Signal Processing Toolbox についてさらに検索

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by