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

📄 ica.m

📁 基于MATLAB完成的神经网络源程序,可以利用该程序完成有关神经网络的应用。
💻 M
字号:
% The time period of the signal consideredTf=0.5; % The sampling time periodTs=1e-5;t=0:Ts:Tf;Num_iter=100000;% The source signalsu1=0.1*sin(400*t).*cos(30*t);u2=0.01*sign(sin(500*t+9*cos(40*t)));u3=2*rand(1,length(t))-1;u=[u1; u2; u3];A=[0.56 0.79 -0.37; -0.75 0.65 0.86; 0.17 0.32 -0.48];% Mixing the sourcesx=A*u;% Runs the Algorithm for 10 different initial weightsfor r=1:10,flag=0;% error definition for convergenceerror=1e-2;nu=0.1;% initialising the weightsW=0.1*rand(3,3);% storing the initial weightsW_init((r-1)*3+1:r*3,1:3)=W;for i=1:Num_iter,% Demixing x with W y=W*x;% The activation function f=(3/4)*y.^11+(25/4)*y.^9+(-14/3)*y.^7+(-47/4)*y.^5+(29/4)*y.^3; dW=(eye(3)-f*y')*W;% The weight update W=W+nu*dW% Break if Algorithm diverges if (sum(sum(isnan(W)))>0) flag=1; break; end   max(max(abs(dW)));% Break if Algorithm converges-- max weight update is less than error if (max(max(abs(dW)))<error & i>10) break; end;end% Number of iterations takenif (~flag) num(r)=i; else num(r)=0; end% store the final weightsW_end((r-1)*3+1:r*3,1:3)=W;iend%save all valuessave NUM8 num -asciisave W_init8 W_init -ascii save W_end8 W_end -ascii 

⌨️ 快捷键说明

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