Here is a MATLAB program to implement logic functions using a McCulloch-Pitts neuron:
% McCulloch-Pitts neuron for logic functions
% Inputs
x1 = 1;
x2 = 0;
% Weights
w1 = 1;
w2 = 1;
% Threshold
theta = 2;
% Net input
net = x1*w1 + x2*w2;
% Activation function
if net >= theta
y = 1;
else
y = 0;
end
% Output
disp(y)
This implements a basic AND logic gate using a McCulloch-Pitts neuron.