softdataassignmentweights.m
来自「语音信号处理前分离信号噪声,matlab环境下运行,使信号处理效果更好」· M 代码 · 共 61 行
M
61 行
% SOFTDATAASSIGNMENTWEIGHTS soft-LOST soft data assignment%% dataWeights = softDataAssignmentWeights(M,N,B,signalSize,data,lineVectors)%% inputs;% M : Number of sources;% N : Number of mixtures;% B : Soft boundary value;% signalSize : Number of data points;% data : Mixture data;% lineVectors : Line orientation vectors%% outputs:% dataWeights : Partial Assignment of data points to line orientations%% % Code available at http://www-bcl.cs.may.ie/~pogrady/%% Function provided as part of Soft-LOST matlab functions%% Paul D. O'Grady - 14-11-2003% (paul.ogrady@may.ie) function dataWeights = softDataAssignmentWeights(M,N,B,signalSize,data,lineVectors)null_vector = zeros(N,1);zero_weights = zeros(1,M);% defining size in advance makes code run quickerZ(signalSize,M) = 0; for j = 1:signalSize dataPoint = data(:,j);%normalise(data(:,j)); if dataPoint ~= null_vector for count = 1:M %test the data with its oppsite signs R(count) = norm(dataPoint'-(lineVectors(count,:)*dataPoint)*lineVectors(count,:)); end R = -B*R; expR = exp(R); expRSum = sum(expR); Z(j,:) = expR/expRSum; else Z(j,:) = zero_weights; end;end;dataWeights = Z;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?