example53_test.m

来自「是一个用MATLAB编的一个系统」· M 代码 · 共 45 行

M
45
字号
%hf3_test
%==============
%==============
figure('name','观察网络的不稳定平衡点','numbertitle','off');

%define the problem...
clc
T=[+1 -1;
   -1 +1];

%design the network...
[W,B]=solvehop(T);


%strike ang key to simulate the network some more...
clc
hold on
color='rgbmy';   
for i=1:25
   a=rands(2,1);
   [a,a1]=simuhop(a,W,B,20);
   plot(a1(1,1),a1(2,1),'b+',a1(1,:),a1(2,:),color(rem(i,5)+1))   
end

%to observe other point

figure;
axis([-2 2 -2 2])
 P=[-1 -0.5 0 0.5 1.0;
     -1 -0.5 0 0.5 1.0];
axis([-2 2 -2 2]);
plot(P(1,:),P(2,:),'r+');



for k=1:5
    disp('Hit<RETURN>to see the output after one cycle.');
    pause,disp('')
    AA=simuhop(P,W,B,k);
    k
    fprintf('Output Vectors:')
    AA
    plot(AA(1,:),AA(2,:),'ko'),axis([-1 1 -1 1]);

end

⌨️ 快捷键说明

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