function y=perrecal(inp,w) % % This function implements the perception recall operation % % Input arguments: % % inp - input matrix (m patterns, n inputs) % w - value of the weight vector (bias is the (n+1)th weight % % Output arguments: % % y - output vector % [m,n]=size(inp); for i=1:m y(i)=w*[inp(i,:) 1]'; if y(i)>=0 y(i)=1; else y(i)=0; end end