资源简介
实用ICA算法对2个混合的声音信号进行分离,采用牛顿下降法对初值选取有一定要求
代码片段和文件信息
[s1f1b1]=wavread(‘1.wav‘);
[s2f2b2]=wavread(‘3.wav‘);
s1=s1-mean(s1);
s2=s2-mean(s2);
s1=s1/std(s1); %std求标准差PCA的预处理,使s的方差为1
s2=s2/std(s2);
s=[s1‘;s2‘];
N=length(s1);
A=[0.60.4;0.350.65];
x=A*s;
x1=x(1:);x2=x(2:);
x(1:)=x(1:)-mean(x(1:)); %用PCA预处理,使x(i)之间不相关并有单位方差
x(2:)=x(2:)-mean(x(2:));
CXX=x*x‘/N;
[DL]=eig(CXX); %D特征向量,L特征值
v=D‘*x; %因为并不需要降维所以就用所以用到所有特征向量
v1=v(1:);v2=v(2:); %使v方差为1使得v‘*v=1
v1=v1/std(v1);v2=v2/std(v2);
v=[v1;v2];
w1=[1;1];
w1=w1/sqrt(sum(w1.^2)); %将w1标准化
w2=[1;-1];
w2=w2/sqrt(sum(w2.^2));
w=[w1‘;w2‘];
a=[0;0];b=0;k=0;
while k<1
for i=1:N
a=a-[v(1i);v(2i)]*tan(w1(1)*v(1i)+w1(2)*v(2i));
b=b-1/(cos(w1(1)*v(1i)+w1(2)*v(2i)))^2;
end
w1=w1-1000*(a/N)/(b/N); %用牛顿法迭代,G取lgcos(x)
w1=w1/sqrt(sum(w1.^2));
if(1000*(a/N)/(b/N)<1e-4) %两次迭代间的w差小于1e-5则停止迭代
k=1;
end
end
y1=w1‘*v;
a=[0;0];b=0;k=0;
while k<1
for i=1:N
a=a-[v(1i);v(2i)]*tan(w1(1)*v(1i)+w1(2)*v(2i));
b=b-1/(cos(w1(1)*v(1i)+w1(2)*v(2i)))^2;
end
w1=w1-1000*(a/N)/(b/N); %用牛顿法迭代,G取lgcos(x)
w1=w1/sqrt(sum(w1.^2));
if(1000*(a/N)/(b/N)<1e-4) %两次迭代间的w差小于1e-5则停止迭代
k=1;
end
end
y2=w2‘*v;
subplot(231)plot(s1);
subplot(232)plot(x1);
subplot(233)plot(y1);
subplot(234)plot(s2);
subplot(235)plot(x2);
subplot(236)plot(y2);
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 1791 2012-12-10 21:18 ICA.m
文件 160044 2006-12-21 02:27 1.wav
文件 160044 2006-12-21 02:24 2.wav
文件 160044 2006-12-21 05:07 3.wav
文件 160044 2006-12-21 05:34 4.wav
----------- --------- ---------- ----- ----
641967 5
相关资源
- Synthesis Crystal Structure and Theoretical
- Wong-Zakai Perturbation of Invariant Manifolds
- Vehicle Dynamics Theory and Application
- WebSphere_Application_Server教程
- Engineeing Design via Surrogate Modelling-A pr
- Linear Algebra and Its Applications.pdf 4th Gi
- Applied Mathematical Programming
- suricata+elk+kibana+logstash安装手册.docx
- Statistical Orbit Determination
- QSFP-DD_Hardware_Specification_Rev_4.0
- archicad22 4005 注册工具.zip
- probability and statistical inference NINTH ED
- Delphi.High.Performance.Applications.Concurren
- 数理逻辑入门 A Friendly Introduction to
- OV2778-Preliminary-Specification-a-CSP_Version
- Analytical Methods in Fuzzy Modeling and Contr
- Time Series Analysis and Its Applications With
- fastICA算法编程
- solution manual for numerical analysis
- Data clustering algorithm and application
- 数码相片恢复工具Digicam Photo Recovery
- EtherCAT_Communication
- Mathematical Methods for Physicists 7th Editio
- High-Dimensional Probability: An Introduction
- Practical Optimization
- Introduction to Mathematical Logic Sixth Editi
- 词法语法分析器
- PCA_ICA_LDA详细介绍与比较
- USB Type-C Specification Release 1.3
- Wireless Communications (Cambridge 2005) G
评论
共有 条评论