MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn moreOpportunities for recent engineering grads.

Apply Today**New to MATLAB?**

Asked by Simone Leon
on 1 Aug 2011

I am looking for a matlab code for a single layer perceptron model. The code should be able to cater for the following:

// Load sample input patterns // Load sample output patterns // Initialise weights // Set learning rate // Calculate output // Calculate error // Update weights // Convert error to absolute value // Display network generalisation // Calculate output

Any assistance would be greatly appreciated.

*No products are associated with this question.*

Answer by Greg Heath
on 15 Apr 2012

If you do not have access to the Neural Network Toolbox. Try searching the Newsgroup archives and FEX. If you know the weight updating formula, you can program the rest your self.

Greg

## 2 Comments

## zahra (view profile)

Direct link to this comment:http://www.mathworks.com/matlabcentral/answers/12782#comment_73592

I am looking for a matlab code for a single layer perceptron model. The code should be able to cater for the following:

// Load sample input patterns // Load sample output patterns // Initialise weights // Set learning rate // Calculate output // Calculate error // Update weights // Convert error to absolute value // Display network generalisation // Calculate output

## zahra (view profile)

Direct link to this comment:http://www.mathworks.com/matlabcentral/answers/12782#comment_73594

Any assistance would be greatly appreciated.