当前位置:网站首页>Implementation of MATLAB short-time autocorrelation
Implementation of MATLAB short-time autocorrelation
2022-07-26 22:02:00 【Hu Gang 2016】
The use of voice.txt The contents are as follows , It is composed of many lines

fid=fopen('voice.txt', 'rt');
x=fscanf(fid, '%f');
fclose(fid);
% Rectangular windows do autocorrelation
s1=x(1: 320);% Take an array x Before 320 A digital
N=320;
A=[];
for k=1:320
sum=0;
for m=1:N-k+1
sum=sum+s1(m)*s1(m+k-1);% Autocorrelation
end
A(k)=sum;
end
disp(A);
for k=1:320
A1(k)=A(k)/A(1); % normalization A(k);
end
%hamming Window autocorrelation
f=zeros(1, 320);
n=1;
j=1;
while j<=320
f(1, j)=x(n)*[0.54-0.46*cos(2*pi*n/319)];%x(n)*hamming window
j=j+1;
n=n+1;
end
B=[];
for k=1:320
sum=0;
for m=1:N-k+1
sum=sum+f(m)*f(m+k-1);% Autocorrelation
end
B(k)=sum;
end
for k=1:320
B1(k)=B(k)/B(1);% normalization
end
s2=s1/max(s1);
figure(1);
subplot(3,1,1);
plot(s2);
xlabel(' Sample number ');
ylabel(' amplitude ');
axis([0, 320, -1, 1]);
subplot(3, 1, 2);
plot(A1);
xlabel(' Time delay k');
ylabel('R(k)');
axis([0, 320, -1, 1]);
subplot(3,1,3);
plot(B1);
xlabel(' Time delay k');
ylabel('R(k)');
axis([0, 320, -1, 1]);

边栏推荐
- Pytorch squeeze() unsqueeze() 用法
- [MySql]substr用法-查询表的某个字段的具体位数的值
- 按关键字搜索易贝商品 API
- 从手动测试,到自动化测试老司机,只用了几个月,我的薪资翻了一倍
- Pytoch squeeze() unsqueeze() usage
- TASK04|分类分析
- Highlight the secondary and tertiary columns under the primary column of pbootcms
- Tester: "I have five years of testing experience" HR: "no, you just used one year of work experience for five years."
- [shutter -- geTx] pop up - dialog, snackBar, bottomsheet
- matlab 画短时平均幅度谱
猜你喜欢

我的sql没问题为什么还是这么慢|MySQL加锁规则

Oppo self-developed large-scale knowledge map and its application in digital intelligence engineering

Xshell7 personal free download, use

FreeRTOS personal notes - Events

7、 Wechat applet running error: error: illegal appid, invalid appid

从手动测试,到自动化测试老司机,只用了几个月,我的薪资翻了一倍

京东一面:Redis 如何实现库存扣减操作?如何防止商品被超卖?

仅需一个依赖给Swagger换上新皮肤,既简单又炫酷~

安全浏览器“隐身”模式可以查看历史记录吗?

技术分享 | 服务端接口自动化测试, Requests 库的这些功能你了解吗?
随机推荐
Ren Zhengfei talked about the suppression of the United States again: to live is to win, and to defeat the United States
Pytoch squeeze() unsqueeze() usage
Flink's real-time data analysis practice in iFLYTEK AI marketing business
现货黄金操作指南与建议(上)
织梦文档关键词维护不管用
A bowl of noodles in a dream
JDBC总结
寻找数字零售的发展新方向,才是保证数字零售可以进入到全新发展阶段的关键
45、实例分割的labelme数据集转coco数据集以及coco数据集转labelme数据集
Japan approves the export of EUV photoresist to South Korea, and the crisis of Samsung and SK Hynix may be alleviated
xshell7个人免费下载,使用
OPPO 自研大规模知识图谱及其在数智工程中的应用
[audio and video] ijkplayer player parameter description document
Leetcode exercise - Sword finger offer II 005. maximum product of word length
Pinduoduo gets search term recommendation API
拼多多获得搜索词推荐 API
Cmake compiling obs-studio-27.2.0
TASK04|分类分析
FreeRTOS personal notes - Events
Isilon 的OneFs常见操作命令(一)