function g = sigmoid(z)
%SIGMOID Compute sigmoid function
%J = SIGMOID(z) computes the sigmoid of z.
g = 1.0 ./ (1.0 + exp(-z));
end
I'm going through the Andrew Ng Coursera course. I doubt that how exp(-z) is computed directly while z is a matrix?