fastica算法matlab代码讲解,FastICA实现.. Matlab

icon1.gif FastICA实现.. Matlab

我一直在研究使用MatLab的FastICA算法实现。目前,代码无法像id一样分隔信号。我想知道是否有人可以给我一些有关解决此问题的建议?

disp('*****Importing Signals*****'); s = [1,30000]; [m1,Fs1] = audioread('OSR_us_000_0034_8k.wav', s); [f1,Fs2] = audioread('OSR_us_000_0017_8k.wav', s); ss = size(f1,1); n = 2; disp('*****Mixing Signals*****'); A = randn(n,n); %developing mixing matrix x = A*[m1';f1']; %A*x m_x = sum(x, n)/ss; %mean of x xx = x - repmat(m_x, 1, ss); %centering the matrix c = cov(x'); sq = inv(sqrtm(c)); %whitening the data x = c*xx; D = diff(tanh(x)); %setting up newtons method SD = diff(D); disp('*****Generating Weighted Matrix*****'); w = randn(n,1); %Random weight vector w = w/norm(w,2); %unit vector w0 = randn(n,1); w0 = w0/norm(w0,2); %unit vector disp('*****Unmixing Signals*****'); while abs(abs(w0'*w)-1) > size(w,1) w0 = w; w = x*D(w'*x) - sum(SD'*(w'*x))*w; %perform ICA w = w/norm(w, 2); end disp('*****Output After ICA*****'); sound(w'*x); % Supposed to be one of the original signals subplot(4,1,1);plot(m1); title('Original Male Voice'); subplot(4,1,2);plot(f1); title('Original Female Voice'); subplot(4,1,4);plot(w'*x); title('Post ICA: Estimated Signal'); %figure; %plot(z); title('Random Mixed Signal'); %figure; %plot(100*(w'*x)); title('Post ICA: Estimated Signal');

更多&回答...

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值