From: <sch...@us...> - 2010-06-16 20:11:34
|
Revision: 7440 http://octave.svn.sourceforge.net/octave/?rev=7440&view=rev Author: schloegl Date: 2010-06-16 20:11:25 +0000 (Wed, 16 Jun 2010) Log Message: ----------- simplify expressions and fix typos Modified Paths: -------------- trunk/octave-forge/main/data-smoothing/inst/ddmat.m trunk/octave-forge/main/data-smoothing/inst/regdatasmooth.m trunk/octave-forge/main/info-theory/inst/conditionalentropy_XY.m trunk/octave-forge/main/nnet/inst/__calcjacobian.m trunk/octave-forge/main/vrml/inst/vrml_faces.m Modified: trunk/octave-forge/main/data-smoothing/inst/ddmat.m =================================================================== --- trunk/octave-forge/main/data-smoothing/inst/ddmat.m 2010-06-16 19:19:36 UTC (rev 7439) +++ trunk/octave-forge/main/data-smoothing/inst/ddmat.m 2010-06-16 20:11:25 UTC (rev 7440) @@ -37,7 +37,7 @@ function D = ddmat(x, d) - if ( size(x)(2) != 1 ) + if ( size(x,2) != 1 ) error("x should be a column vector") endif m = length(x); @@ -45,7 +45,7 @@ D = speye(m); else dx = x((d + 1):m) - x(1:(m - d)); - V = sparse(diag(1 ./ dx); + V = sparse(diag(1 ./ dx)); D = d * V * diff(ddmat(x, d - 1)); endif endfunction Modified: trunk/octave-forge/main/data-smoothing/inst/regdatasmooth.m =================================================================== --- trunk/octave-forge/main/data-smoothing/inst/regdatasmooth.m 2010-06-16 19:19:36 UTC (rev 7439) +++ trunk/octave-forge/main/data-smoothing/inst/regdatasmooth.m 2010-06-16 20:11:25 UTC (rev 7440) @@ -103,10 +103,10 @@ if (length(x)!=length(y)) error("x and y must be equal length vectors") endif - if ( size(x)(1)==1 ) + if ( size(x,1)==1 ) x = x'; endif - if ( size(y)(1)==1 ) + if ( size(y,1)==1 ) y = y'; endif Modified: trunk/octave-forge/main/info-theory/inst/conditionalentropy_XY.m =================================================================== --- trunk/octave-forge/main/info-theory/inst/conditionalentropy_XY.m 2010-06-16 19:19:36 UTC (rev 7439) +++ trunk/octave-forge/main/info-theory/inst/conditionalentropy_XY.m 2010-06-16 20:11:25 UTC (rev 7440) @@ -48,7 +48,7 @@ function val=conditionalentropy_XY(XY) val=0.0; - for i=1:size(XY)(2) + for i=1:size(XY, 2) Yi = sum(XY(i,:)); val = val + Yi*entropy(XY(i,:)/sum(XY(i,:))); end Modified: trunk/octave-forge/main/nnet/inst/__calcjacobian.m =================================================================== --- trunk/octave-forge/main/nnet/inst/__calcjacobian.m 2010-06-16 19:19:36 UTC (rev 7439) +++ trunk/octave-forge/main/nnet/inst/__calcjacobian.m 2010-06-16 20:11:25 UTC (rev 7440) @@ -124,7 +124,7 @@ ## tildeSx = -dFx(n_x^x) ## use mIdentity to calculate the number of targets correctly ## for all other layers, use instead: - ## tildeSx(-1) = dF1(n_x^(x-1)))(W^x)' * tildeSx; + ## tildeSx(-1) = dF1(n_x^(x-1))(W^x)' * tildeSx; for iLayers = nLayers:-1:1 # this will count from the last # layer to the first layer ... Modified: trunk/octave-forge/main/vrml/inst/vrml_faces.m =================================================================== --- trunk/octave-forge/main/vrml/inst/vrml_faces.m 2010-06-16 19:19:36 UTC (rev 7439) +++ trunk/octave-forge/main/vrml/inst/vrml_faces.m 2010-06-16 20:11:25 UTC (rev 7440) @@ -90,7 +90,6 @@ opt0 = " smooth convex " ; verbose = 0 ; - nargin = nargin(); nargin -= 2 ; i = 1; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |