【发布时间】:2018-09-11 03:08:51
【问题描述】:
我正在尝试分析以 1 分钟间隔采样 10 天的车轮转动时间序列。 t 是一个 1 x 14000 数组,从 0.1666 小时到 240 小时。 analysis.timeseries.(grp).(chs) 是一个 1 x 14000 数组,用于我感兴趣的每个组及其特定通道,这些通道指定了每分钟采样的活动。我有兴趣收集最大功率和它出现的频率。我的问题是我不确定 f 的单位是什么。我想让它以每小时的周期返回,并且最长跨度为 30 小时。我尝试使用文档中的 Galileo 示例作为指南,但它似乎不起作用。 以下是我的代码:
groups = {'GFF' 'GMF' 'SFF' 'SMF'};
chgroups = {chnamesGF chnamesGM chnamesSF chnamesSM};
t1 = (t * 3600); %matlab treats this as seconds so convert it to an hour form
onehour = seconds(hours(1));
for i = 1:4
grp = groups{1,i};
chn = chgroups{1,i};
for channel = 1:length(chn)
chs = chn{channel,1};
[pxx,f]= plomb(analysis.timeseries.(grp).(chs),t, 30/onehour,'normalized');
analysis.pxx.(grp).(chs) = pxx;
analysis.f.(grp).(chs) = f;
analysis.lsp.power.(grp).(chs) = max(pxx);
[row,col,v] = find(analysis.pxx.(grp).(chs) == analysis.lsp.power.(grp).(chs));
analysis.lsp.tau.(grp).(chs) = analysis.f.(grp).(chs)(row);
end
end
【问题讨论】:
标签: matlab