Skip to content

Instantly share code, notes, and snippets.

@pminkov
Created July 30, 2012 05:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pminkov/3205075 to your computer and use it in GitHub Desktop.
Save pminkov/3205075 to your computer and use it in GitHub Desktop.
Sigmoid function
function g = sigmoid(z)
%SIGMOID Compute sigmoid functoon
% J = SIGMOID(z) computes the sigmoid of z.
g = arrayfun( @(x) 1 / (1 + e^(-x)), z);
% =============================================================
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment