• 大小: 2KB
    文件类型: .m
    金币: 1
    下载: 0 次
    发布日期: 2021-01-03
  • 语言: Matlab
  • 标签: 负熵程序  

资源简介

独立分量分析中的程序,其中有负熵的具体计算流程

资源截图

代码片段和文件信息


K=2;
N=500;
k=1:N;
s1=randn(1length(k));%产生符合分布的序列
s2=sin(k/2);
figure(1)
subplot(221);
plot(ks1);
title(‘高斯随机噪声序列‘);
subplot(222);
plot(ks2);
title(‘正弦信号‘)
X=zeros(KN);
A=randn(K);%产生随机矩阵混合A
H=A*[s1;s2];
figure(2);
plot(kH);
title(‘观测信号‘)
%实现对观察数据矩阵H的预白化
B=double(H);
m=mean(B2);
B=B- m(:ones(1size(B2)));%去均值
covarianceMatrix=cov(B‘);
% covarianceMatrix=A*A‘;
[y x] = eig (covarianceMatrix);
whiteningMatrix = x^(-.5)* y‘;%白化矩阵
dewhiteningMatrix = y * sqrt (x);%去白化矩阵
M=dewhiteningMatrix;
new_A=whiteningMatrix*B;%新的混合矩阵即要做fast算法的矩阵
figure(3)
plot(knew_A);
title(‘whitened‘)

Q=new_A;
%用FastICA算法实现对源信进行分离
epsilon=0.0001;
W=rand(K);
iter = zeros(1K);
for p=1:K
    W(:p)=W(:p)/norm(W(:p));
    exit=0;%判断是否收敛标记,0做,1退出
    count=0;%判断独立成

评论

共有 条评论

相关资源