Implement the perceptron algorithm whose weight update rule is given by
, where n is the learning rate parameter. Train your perceptron using the dataset in file “Data2.txt” for n in the range [0.0007, 0.0017] with a step of 0.0001. Each row in the file represents one input vector. The first 2 columns correspond to the input features (x1 and x2), while the third column corresponds to the target values (t = -1 or t = 1). Start with initial weight vector w(0)=[1 0 0] T.
Cite As
Shaimaa Omer (2026). Perceptron (https://www.mathworks.com/matlabcentral/fileexchange/134891-perceptron), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2013a
Compatible with any release
Platform Compatibility
Windows macOS LinuxTags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.0.0 |
