⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 demo.m

📁 This code is just a front-end to source separation algorithms.
💻 M
字号:
% This code is just a front-end to source separation algorithms.% Purpose:% 1) generate synthetic data% 2) call some source separation algorithm% 3) display the results% The data are CM (constant modulus signals and QAM4.% The mixing matrix  is randomly generated.% Comments, bug reports, info requests are appreciated% and should be directed to cardoso@sig.enst.fr (Jean-Francois Cardoso)% Author : Jean-Francois Cardoso CNRS URA 820 / GdR TdSI / Telecom Paris%=======================================================================N	= 4	;  % N = number of sensors (add the relevant lines in S= ...)M	= 3 	;  % M = number of sourcesT	= 200	;  % sample sizeNdB	= -15 	;  % kind of noise level in dB%----------------------------------------------------------------------------disp('Each of the following plots shows the COMPLEX PLANE.')disp('Each point is a sample of a source signal, of a sensor output')disp('or a separated signal as indicated.')while 1disp('____________________________________________________________');% the source signalsS= [ ...exp(2*i*pi*rand(1,T))					; 	% constant modulus random phaseexp(2*i*pi*rand(1,T))					; 	% constant modulus random phase(2*fix(2*rand(1,T))-1+i*(2*fix(2*rand(1,T))-1))/sqrt(2) ;	% QAM4];% random mixing matrixA=randn(N,M)+j*randn(N,M);disp('Mixing matrix');disp(A);  clg;subplot(1,1,1);for is=1:M, subplot(2,2,is); plot(S(is,:),'.');title('One of the source signals'); axis('square'); axis('equal'); axis([-2 2 -2 2]);end;fprintf('\nStrike any key to mix\n');pause;% mixing and noisingnoiseamp = 10^(NdB/20)/sqrt(2) ; % (the sqrt(2) accounts for real+imaginary powers)X= A*S + noiseamp*(randn(N,T)+i*randn(N,T));clg;for is=1:min([ N 4]), subplot(2,2,is); plot(X(is,:),'.');title('One of the mixed signals'); axis('square');axis('equal');%axis([-2 2 -2 2]);end;fprintf('\nStrike any key to unmix\n');pause;% Separationfprintf('\nIdentification running ......\n');[Ae,Se]=jade(X,M);clg;for is=1:M, subplot(2,2,is); plot(Se(is,:),'.');title('One of the separated signals'); axis('square');axis('equal');axis([-2 2 -2 2]);end;% Performancedisp('Performance:');disp('The global (sepration*mixing) matrix should be close to a permutation');disp('The following shows its squared entries (rejection levels)');disp(abs(pinv(Ae)*A).^2);fprintf('\nStrike any key for a different mixture\n');pause;end; %endless loop

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -