资源简介
关于稀疏分解的盲源分离程序,有相应的文章可相对照
代码片段和文件信息
function [y A]= sparseBSS1(XLlangdaGhdelta)
%----------------------------------------------------------------
% 2009-04-15 YangZhicong
% X: observed signaleach row correspond to a sensor observations
% L: the length of FFT (or the length of Hanning window)
% langda: adjust the desired angular width
% G: % discretize the potential field by taking a sample of G points
% h: threshold
% y: estimated sourses
% A: estimated mix matrix
% here we just consider the special casei.e m = 2
[m T] = size(X);
if nargin < 2L = 2048; end
d = round(0.15*L)*2; % the hop distance
overlap = L - d; % number of samples of overlap between adjacent windows
w = hann(L)‘; % Hann (Hanning) window function;
frame_X = bss_make_frames(Xwoverlap); % decompose X into frames. For instance frame_X(::1)
% correspond to 1st sensoreach row is a frame.
% now each column of frame_X(::i) is a frame for convenience of fft operation
for i=1:m
frame_X_temp(::i) = frame_X(::i)‘;
end
frame_X = frame_X_temp;
clear frame_X_temp;
frame_X_Fs = fft(frame_X);
K = L/2 +1; % preserve the positive half spectrum
for i = 1:m
temp_Matrix = frame_X_Fs(1:K:i);
realPart = real(temp_Matrix);
imagPart = imag(temp_Matrix);
temp_Matrix = [realPart;imagPart];
[rowcolumn] = size(temp_Matrix);
Xu(i:) = reshape(temp_Matrix 1row*column);
end
if nargin < 4 G =60; end
if nargin < 3langda = 5; end
% we consider the special case for m = 2
theta = rem(atan2(Xu(2:)Xu(1:))+2*pipi);
radius = sqrt((Xu(1:).*Xu(1:)+Xu(2:).*Xu(2:)));
radius = radius /max(radius); % normalize to one
theta_k = pi/2/G + (1:G)*pi/G;
if nargin < 5h = 0.2;end % discarding the less reliable data points
index = find(radius>=h);
radius = radius(index);
theta = theta(index);
figure(‘Name‘‘Scatter Plot ‘);
polar(thetaradius‘.‘);
for k = 1:G
potential(k) = sum(radius.*Tao(langda*(theta-theta_k(k))));
end
figure(‘Name‘‘Potential Funtction‘);
plot(theta_k/pi*180potential);
% A point is considered a maximum peak if it has the maximal
% value and was preceded (to the left) by a value lower by
% DELTA.
if nargin < 6 delta = max(abs(potential))*0.1; end
maxtab = peakdet(potential delta theta_k); % find the maxima of potential function
theta_esti = maxtab(:1);
% get the first m maxima of potential function
theta_esti = sort(theta_esti‘descend‘);
theta_esti = theta_esti (1:m);
A = [cos(theta_esti) sin(theta_esti)]‘;
W = inv(A); % separation matrix
y = W*X;
end
%%
% ------------------------------PEAKDET.m--------------------------------
function [maxtab mintab]=peakdet(v delta x)
%PEAKDET Detect peaks in a vector
% [MAXTAB MINTAB] = PEAKDET(V DELTA) finds the local
% maxima and minima (“peaks“) in the vector V.
% MAXTAB and MINTAB consists of two columns. Column 1
% contains indices in V and column 2 the
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 4590 2009-04-16 12:31 稀疏盲源分离自编程序\sparseBSS1.m
文件 19968 2011-10-11 19:59 稀疏盲源分离自编程序\sparseBSS1说明.doc
目录 0 2011-10-11 20:02 稀疏盲源分离自编程序
----------- --------- ---------- ----- ----
24558 3
相关资源
- 基于JADE的盲源分离算法程序
- 正则化稀疏模型综述
- 频域盲源分离方法
- 信号DCT字典稀疏表示
- l1范数最优化的相关程序,求出信号的
- 稀疏矩阵相加相乘三元组、十字链表
- 学生信息表&稀疏矩阵
- 一元稀疏多项式计算器带界面
- 基于加权l1范数的稀疏信号重建
- 基于字典学习与稀疏模型的SAR图像压
- 压缩感知稀疏贝叶斯算法
- Patch_Sparsity代码opencv
- 稀疏表示SAR成像
- 匹配追踪MP、正交匹配追踪算法OMP,稀
- 稀疏阵的方向图仿真,给出了不同条
- 稀疏自适应Volterra滤波的QRD_RLS算法
- 稀疏矩阵和三元组的基础理论
- 多项式相乘一元稀疏多项式简单计算
- ksvdbox+ompbox
- 基于Gabor感知多成份字典的图像稀疏表
- 已知稀疏矩阵用三元组表示编写C=A*
- CS294A Lecture notes Sparse autoencoder 稀疏自
- 稀疏分解图像重建程序,把图像分解
- 稀疏矩阵的三元组程序
- 盲信号处理中的盲源分离经典FASTICA算
- 稀疏表示方法综述
- gabor字典
- 基于稀疏变量的欠定盲源分离
- 稀疏矩阵的十字链表表示方法:矩阵
- 稀疏表达:向量、矩阵与张量
评论
共有 条评论