当前位置:网站首页>Matlab pitch period estimation post-processing
Matlab pitch period estimation post-processing
2022-07-26 22:02:00 【Hu Gang 2016】
fid=fopen('zhouqi.txt', 'rt');
zhouqi=fscanf(fid, '%f');
fclose(fid);
zhouqi0=medfilt1(zhouqi, 5);
zhouqi1=medfilt1(zhouqi0, 3);
zhouqi2=linsmooth(zhouqi0, 5);
w=[];
w=zhouqi;
w1=w-zhouqi2;
w1=linsmooth(w1, 5);
zhouqi3=w1+zhouqi2;
v=[];
v(1)=0;v(2)=0;v(3)=0;v(4)=0;
for i=1:(length(zhouqi) - 4)
v(i+4)=zhouqi(i);
end
%v(:,1) To get v The first column element in the matrix
%v(1,:) To get v The first row of elements in the matrix
%v(:) matrix v Convert to a row vector , It's a line
% for example :
%>> A = rand(2,3)
%
%A =
%0.6925 0.3965 0.7802
%0.5567 0.0616 0.3376
%>> B = A(:)
%B =
%0.6925
%0.5567
%0.3965
%0.0616
%0.7802
v=v(:);
v1=v-zhouqi2;
v1=medfilt1(v1, 5);
v1=linsmooth(v1, 5);
zhouqi4=v1+zhouqi2;
figure(1);
subplot(511);
plot(zhouqi);
xlabel(' frames ');
ylabel(' Sample number ');
title(' Original pitch period trajectory ')
subplot(512);
plot(zhouqi1);
xlabel(' frames ');
ylabel(' Sample number ');
axis([0, 360, 0, 150]);
title(' Combination of five point median smoothing and three-point median smoothing ')
subplot(513);
plot(zhouqi2);
xlabel(' frames ');
ylabel(' Sample number ');
axis([0, 360, 0, 150]);
title(' A combination of five point median smoothing and five point linear smoothing ')
subplot(514);
plot(zhouqi3);
xlabel(' frames ');
ylabel(' Sample number ');
axis([0, 360, 0, 150]);
title(' Quadratic smoothing algorithm ')
subplot(515),plot(zhouqi4);
xlabel(' frames ')
ylabel(' Sample number ')
axis([0,360,0,150])
title(' Quadratic smoothing algorithm with delay ')
function [y]=linsmooth(x, n)
%disp(size(x));% x yes 360 That's ok ,1 Columns of the matrix
win=hann(n);
win=win/sum(win); % normalization
%disp(size(win));
disp(win);
[r,c]=size(x);%size(x) return [ Row number , Number of columns ]
if min(r,c)~=1 % ~= The representative is not equal to
error('sorry, no matrix here!:')
end
if r==1 % Row vector
len=c;
else % Column vector
len=r;
x=x.';% Transpose the column vector to the row vector
end
%disp(len);
% Come here x It must be a row vector
y=zeros(len,1);
if mod(n,2)==0 % For return m Divide 2 Remainder after
m=n/2;
x = [ones(1,m)*x(1) x ones(1,m)*x(len)]';
else
m=(n-1)/2; % Experimental here n=5, m=2
x = [ones(1,m)*x(1) x ones(1,m+1)*x(len)]';% Generate new array , In the array x Add in front 2 Elements , In the array x Back plus 3 Elements
end
for k=1:len
y(k) = win'*x(k:k+n-1); % One row and five columns * Five rows and one column
end
end

边栏推荐
- The United States once again challenged: Forbidding contractors to purchase the equipment and technology of these five Chinese companies
- Flextronics responded to the "seizure of Huawei materials" incident: deeply regretted, looking forward to continuing cooperation!
- Supplement - nonlinear programming
- Highlight the secondary and tertiary columns under the primary column of pbootcms
- FreeRTOS个人笔记-软件定时器
- Go----Go语言中的变量使用方法
- Schematic diagram of MOS tube
- Flink 在讯飞 AI 营销业务的实时数据分析实践
- 伦敦银外汇走势理解与实操
- 攻防世界----ics-07
猜你喜欢

MOS 管示意图

OPPO 自研大规模知识图谱及其在数智工程中的应用
![[MySql]substr用法-查询表的某个字段的具体位数的值](/img/d5/68658ff15f204dc97abfe7c9e6b354.png)
[MySql]substr用法-查询表的某个字段的具体位数的值

从手动测试,到自动化测试老司机,只用了几个月,我的薪资翻了一倍
![[mysql]substr usage - query the value of specific digits of a field in the table](/img/d5/68658ff15f204dc97abfe7c9e6b354.png)
[mysql]substr usage - query the value of specific digits of a field in the table

imshow()函数后面如果不加waitKey()函数就不显示

Vi和Vim文本编辑器

JDBC operation and entry case of MySQL

LDAP -- realize unified login management of users

1 - "pytorch deep learning practice" - linear model
随机推荐
Oppo self-developed large-scale knowledge map and its application in digital intelligence engineering
Search Yiwu shopping (PAI Li Tao) API by image
5、 Applet error: message:error: system error, error code: 80058, desc of scope userLocation is empty
When deploying Flink on a single machine and creating the connection table of oracle19c RAC, the error ora-12505 is reported. Who can help
OPPO 自研大规模知识图谱及其在数智工程中的应用
带你搞懂MySQL隔离级别,两个事务同时操作同一行数据会怎样?
TASK04|分类分析
Thoroughly understand the principle and implementation of service discovery
Samsung releases 108million pixel image sensor isocell bright HMX, and Xiaomi will launch
Altium Designer 22 中文字符乱码
Vb.net chart1 processing
NPM, NPM Chinese documents, NPM learning and using
Shrimp Shope takes the commodity list API according to keywords
6、 Wechat applet release process
月薪5万的朋友告诉我,你只是在打杂
补充—非线性规划
Pinduoduo gets search term recommendation API
新来个技术总监要我做一个 IP 属地功能~
flask 源码启动阶段
Can I view the history in the "stealth" mode of the secure browser?