changeset 2:443c6b29f715

Comment on anonymous functions
author Jordi Gutiérrez Hermoso <jordigh@octave.org>
date Fri, 04 Nov 2011 11:11:28 -0400
parents 8967b7da6ac2
children 230b25fa0ea7
files oneVsAll.m
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/oneVsAll.m
+++ b/oneVsAll.m
@@ -13,6 +13,9 @@
 
   for c = 1:num_labels
 
+    ## The following uses @(x) ... notation for defining an anonymous
+    ## function (also known as a closure or a lambda) to be fed to
+    ## fmincg
     all_theta(c, :) = fmincg ( @(t) lrCostFunction (t, X, y == c, lambda),
                               zeros (n+1, 1));
   endfor