% program for ART1 neyral net with four F1 units and three F2 units.
%The weight after some training are given as;
clc; clear all;
vp=0.5;
m=15;
L=40;
n=63;
epn=1;
b=zeros(n,m)+1/(1+n);
t=zeros(m,n)+1;
data = open('data.mat');
s=data.x;
figure(1)
k=1;
for i=1:3
for j=1:7
chartplot(s(k,:),10+(j-1)*15,50-(i-1)*15,9,7);
k=k+1;
end
end
axis ([1 110 0 60]);
title('Input Pattern');
%%%%%%%%%%%----------------------------------------------------------------
charplot(x,xs,ys,row,col)
k=1
for i=1:row
for j=1:col
xl(i,j)=x(k);
k=k+1;
end
end
for i=1:row
for j=1:col
if xl(i,j)==-1
plot(j+xs-1,ys-i+1,'r');
hold on
else
plot(j+xs-1,ys-i+1,'k*');
hold on
end
end
end
% x=s.*t(J,:);
% nx=sum(x);
% if nx/ns>=vp
% b(:,J)=L*x(:)/(L-1+nx);
% t(J,:)=x(1,:);
% con=0;
% else
% y(J) =- 1;
% con=1;
% end
% if y+1 == 0;
% con=0;
% end
% end
% disp('top down weight')
% disp(t);
% disp('bottom-up weight')
% disp(b);