Guest User

Untitled

a guest
Jan 24th, 2020
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. function a = perceptron(W, b, p)
  2. % perceptron
  3. %
  4. % Implementation of a single-neuron perceptron.
  5. % W is a weight matrix of one row.
  6. % b is a bias scalar.
  7. % p is an input vector.
  8. % All vectors are expected to be in row format.
  9. % Output is a single scalar value.
  10.  
  11. %==================================================================
  12.  
  13. n = W*p' + b;
  14. a = hardLimitTransfer(n);
  15.  
  16. end
Advertisement
Add Comment
Please, Sign In to add comment