Skip to content

Instantly share code, notes, and snippets.

@pminkov
Created Jul 30, 2012
Embed
What would you like to do?
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