relnwt_test.m

来自「该代码为盲源分离中的相对牛顿法」· M 代码 · 共 50 行

M
50
字号
%  relnwt_test.m  - TEST of relnewton.m  %%%%%%%%% Generate sparse  data %%%%%%%%N=3;T=1000;A=rand(N);S=sprandn(N,T,0.5);X=A*S;%%%%%% Setup the parameterslam=1e-1; % parameter of smoothing of the absolute value functionniter=100normg_tol=1e-10;%method='relnwt';  method= 'fastnwt'; %%%%%%% Separate with the relative NEWTON %%%%%%%%W=relnewton(X,lam,niter,normg_tol,method)%%%%%%%% COMPUTE QUALITY OF SEPARATIONWA=W*AISR=max(sep_quality(WA))return%%%%%%%%% Generate the uniformly distributed sources %%%%%%%%S= rand(N,T) - 0.5;X=A*S;%%%%%%% Separate with the relative NEWTON %%%%%%%%lam=-6;    % use nonlinearity s^6   W=relnewton(X,lam)%%%%%%%% COMPUTE QUALITY OF SEPARATIONWA=W*AISR=max(sep_quality(WA))

⌨️ 快捷键说明

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