diff --git a/ex2/sigmoid.m b/ex2/sigmoid.m index aeb7572..043d2de 100644 --- a/ex2/sigmoid.m +++ b/ex2/sigmoid.m @@ -2,14 +2,14 @@ function g = sigmoid(z) %SIGMOID Compute sigmoid functoon % J = SIGMOID(z) computes the sigmoid of z. -% You need to return the following variables correctly +% You need to return the following variables correctly g = zeros(size(z)); % ====================== YOUR CODE HERE ====================== % Instructions: Compute the sigmoid of each value of z (z can be a matrix, % vector or scalar). - +g = 1 ./ (1 + exp(-z));