Invalid expression, Correlation Analysis
显示 更早的评论
N = length(data);
Mlen=256;
Mstep=192;
Nramek=floor((N-Mlen)/Mstep+1);
ramki = zeros(Mlen, Nramek);
Xr = zeros(Mlen * 2 - 1, Nramek);
for i=0:Nramek-1
ramki(:, i+1) = data(1 + i*Mstep : i*Mstep + Mlen);
ramki(:, i+1) = ramki(:,i+1) - mean(ramki(:, i+1));
[Xr(:,i+1), lags] = xcorr(ramki(:, i+1));
end
offset = 20;
[XrMax, idxMax] = max(Xr(lags > offset,:));
idxVoiced = XrMax > 0.35*Xr(lags == 0);
lags = lags(lags > offset);
lags = lags(idxMax(idxVoiced));
T = mean(lags) / Fs;
fpod = Fs/mean(lags)
I have question, why this code does not work? I have been thinking about this problem for hours and have no idea :(
Thank for help!
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Correlation and Convolution 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!