1function g = sigmoidGradient(z) 2%SIGMOIDGRADIENT returns the gradient of the sigmoid function 3%evaluated at z 4% g = SIGMOIDGRADIENT(z) computes the gradient of the sigmoid function 5% evaluated at z. This should work regardless if z is a matrix or a 6% vector. In particular, if z is a vector or matrix, you should return 7% the gradient for each element. 8 9g = zeros(size(z)); 10 11% ====================== YOUR CODE HERE ====================== 12% Instructions: Compute the gradient of the sigmoid function evaluated at 13% each value of z (z can be a matrix, vector or scalar). 14g = sigmoid(z).*(1 - sigmoid(z)); 15% ============================================================= 16end 17 18