% Let's test the assertion that the derivative of the binary entropy function is % the negative logit. This example uses four functions from the toolbox. cost_fn = @(p) celldeal({h2nats(p), -logit(p)}); epsilon = 1e-9; err = var_checkgrad(cost_fn, epsilon, rand); assert(err < 1e-6); 'OK' test_exit