Perceptron is used for binary classification tasks and works well only when the data is linearly separable. However, in your case, the task is to classify 26 alphabet letters, which is a multi-class classification problem.
For such problems, you can use the "patternnet" function in MATLAB, which returns a pattern recognition neural network. Pattern recognition networks are feedforward neural networks designed to classify inputs into multiple target classes.
Below is a simple example that creates and trains a pattern recognition network with one hidden layer of size 5:
% Create a pattern recognition network with 5 hidden neurons
net = patternnet(5);
% Train the network with input data x and target labels t
net = train(net, x, t);
% Use the trained network to predict outputs
y = net(x);
You can also refer to the offical MathWorks documentation on “patternnet” for your reference:
