资源简介
Use the autocorrelation function on segments of the signal (windowsize: 100ms) and compute the fundamental frequency. Use a max_time_lag of 100ms in the autocorrelation function and a window shift of 25ms. Create a fundamental frequency vector and plot your pitch contour.

代码片段和文件信息
function [ output_args ] = autocorrelation(signal max_time_lag)
%% name: Sandra Ashipala student number: s0554648
%% name: LinXiaokai student number: 374826
%We write the function just according to the formula provided in
%question
max_sample_lag=max_time_lag*16000; %convert time lag to samples
N=size(signal1);
one_acf=0;
acf = zeros(max_sample_lag+11);
for sample_lag=0:max_sample_lag %compute acf for different lag
for k=1+sample_lag:N %compute acf for one lag
one_acf=one_acf+signal(k)*signal(k-sample_lag);
end
acf(sample_lag+1)=one_acf/N; %collect result of acf
end
output_args=acf;
end
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 2048 2016-12-11 18:52 Programming Homework I\
文件 90976 2013-10-01 18:46 Programming Homework I\13ZZ637A.wav
文件 691 2016-12-11 17:57 Programming Homework I\autocorrelation.asv
文件 716 2016-12-11 19:57 Programming Homework I\autocorrelation.m
文件 2819 2016-12-11 19:07 Programming Homework I\prog_homework_01E1E2.asv
文件 2272 2016-12-11 20:02 Programming Homework I\prog_homework_01E3.asv
文件 2356 2016-12-11 20:14 Programming Homework I\prog_homework_01E3.m
文件 3033 2016-12-11 20:22 Programming Homework I\prog_homework_01_E1E2.m
文件 1470 2016-11-23 15:17 Programming Homework I\stpower.m
文件 1635 2016-11-23 15:17 Programming Homework I\stzerocross.m
文件 1583 2016-11-23 15:17 Programming Homework I\unvoivoi.m
- 上一篇:meanshift原理图像分割matlab程序
- 下一篇:遗传算法matlab源代码
评论
共有 条评论