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

阅读: 评论:0

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

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

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');

更多&回答...

本文发布于:2024-02-02 05:22:47,感谢您对本站的认可!

本文链接:https://www.4u4v.net/it/170682256641632.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:算法   代码   fastica   matlab   Matlab
留言与评论(共有 0 条评论)
   
验证码:

Copyright ©2019-2022 Comsenz Inc.Powered by ©

网站地图1 网站地图2 网站地图3 网站地图4 网站地图5 网站地图6 网站地图7 网站地图8 网站地图9 网站地图10 网站地图11 网站地图12 网站地图13 网站地图14 网站地图15 网站地图16 网站地图17 网站地图18 网站地图19 网站地图20 网站地图21 网站地图22/a> 网站地图23