## octave-cvsupdate

 [Octave-cvsupdate] SF.net SVN: octave:[6956] trunk/octave-forge/main/nnet/inst/__dradbas.m From: - 2010-02-24 16:51:27 ```Revision: 6956 http://octave.svn.sourceforge.net/octave/?rev=6956&view=rev Author: michaelschmid Date: 2010-02-24 16:51:20 +0000 (Wed, 24 Feb 2010) Log Message: ----------- modified inst/__dradbas.m Modified Paths: -------------- trunk/octave-forge/main/nnet/inst/__dradbas.m Modified: trunk/octave-forge/main/nnet/inst/__dradbas.m =================================================================== --- trunk/octave-forge/main/nnet/inst/__dradbas.m 2010-02-24 14:49:13 UTC (rev 6955) +++ trunk/octave-forge/main/nnet/inst/__dradbas.m 2010-02-24 16:51:20 UTC (rev 6956) @@ -16,10 +16,10 @@ ## ;. ## -*- texinfo -*- -## @deftypefn {Function File} {} dradbas (@var{n}) +## @deftypefn {Function File} {} __dradbas (@var{n}) ## First derivative of the radial basis transfer function. ## -## @code{radbas(n) = exp(-n^2)} +## @code{__dradbas(n) = exp(-n^2)*-2*x} ## ## @end deftypefn @@ -31,9 +31,14 @@ if (nargin != 1) print_usage (); else - retval = exp (-n^2); + retval = exp (-n^2)*(-2)*x; + # the derivative of exp(-n^2) must be calculated + # with help of the chain-rule! + # d/dx of e^x = e^x + # d/dx of -x^2 = -2x + # now calculate the product of both endif endfunction -%!assert (radbas (3), exp (-3^2)); +#%!assert (radbas (3), exp (-3^2)); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ```