【发布时间】:2021-05-26 12:48:37
【问题描述】:
我的代码有问题。我有两种数据(我们称它们为 a 和 b)。这些是单元格,在每个单元格中我都有双数/数字(见附图)。我想使用循环将 a 的数据与 b 的数据交叉关联。我正在使用以下代码:
for i=1:numel(a)
[c,lag]=crosscorr(a{i},b{i})
r = [0.65, 1];
ii = c >= r(1) & c <= r(2)
% this finds the index of he rows(2) that have x in between
idx = find(abs(c) > r(1) & abs(c) <= r(2));
% number of intervals with positive check
numIdx{i} = sum(abs(c) > r(1) & abs(c) <= r(2))
Final{i}=(numIdx{i})'
n=Final'
end
【问题讨论】:
标签: matlab command cross-correlation