Matlab函数求C翻译

bloodish bloodish 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
function e_DOF = EDOF(W, O, L, K)
%%e_DOF = EDOF(W, O, L, K)
% Calculate equivalent degrees of freedom
% W(x, L) is window function, devined over [0, L-1], and is zero every else
% O is overlap, 0<O<1 (1 = 100% overlap)
% L is block size, in number of samples
% K is average number

D = floor((1-O)*L); % offset of subsequent frames, in no. of samples. Rounded to nearest integer

rho_ = [];
k_ = 0:L-1;
j_ = 1:K-1;
for j = j_
rho_ = [rho_, sum(W(k_, L).*W(k_+j*D, L))^2/sum(W(k_, L).^2)^2]; %correlation coef. of W
end

varP = 1/K*(1+ 2*sum((K-j_)/K.*rho_)); %variance of spectral estimator

e_DOF = 2/varP; %E.D.O.F. = 2 * E[P(f)]^2 / var[P(f)]
end

本人对Matlab并不熟悉,请各位大大对这个DOF函数给出一个C语言的版本,不甚感激
...全文

相关推荐

评论 1
收藏 已收藏
分享
返回顶部
bloodish
其他开发语言 3,425 成员 15,624 内容