# HG changeset patch # User jwe # Date 1156439358 0 # Node ID b3478d7a0486dbbda250a24b7d3c0577db51c02d # Parent 2289cafef60d6083756fbda21f5d5c9737ea12cb [project @ 2006-08-24 17:09:18 by jwe] diff -r 2289cafef60d -r b3478d7a0486 scripts/ChangeLog --- a/scripts/ChangeLog Thu Aug 24 16:23:12 2006 +0000 +++ b/scripts/ChangeLog Thu Aug 24 17:09:18 2006 +0000 @@ -5,8 +5,11 @@ 2006-08-24 Søren Hauberg - * miscellaneous/bincoeff.m: Use logical indexing instead of - indices computed by calling find on the logical index. + * miscellaneous/bincoeff.m, set/setdiff.m, specfun/factorial.m: + Use logical indexing instead of indices computed by calling find + on the logical index. + + * linear-algebra/krylov.m: Delete unused local var nzidx. 2006-08-23 Quentin Spencer diff -r 2289cafef60d -r b3478d7a0486 scripts/linear-algebra/krylov.m --- a/scripts/linear-algebra/krylov.m Thu Aug 24 16:23:12 2006 +0000 +++ b/scripts/linear-algebra/krylov.m Thu Aug 24 17:09:18 2006 +0000 @@ -95,7 +95,6 @@ # identify trivial null space abm = max (abs ([A, V]')); - nzidx = find (abm != 0); zidx = find (abm == 0); # set up vector of pivot points diff -r 2289cafef60d -r b3478d7a0486 scripts/set/setdiff.m --- a/scripts/set/setdiff.m Thu Aug 24 16:23:12 2006 +0000 +++ b/scripts/set/setdiff.m Thu Aug 24 17:09:18 2006 +0000 @@ -56,7 +56,7 @@ [dummy, idx] = sortrows ([c; b]); ## Eliminate those elements of a that are the same as in b. n = length (dummy); - c(idx(find (dummy(1:n-1) == dummy(2:n))), :) = []; + c(idx(dummy(1:n-1) == dummy(2:n)), :) = []; endif else c = unique (a); @@ -66,7 +66,7 @@ [dummy, idx] = sort ([c(:); b(:)]); ## Eliminate those elements of a that are the same as in b. n = length (dummy); - c(idx(find (dummy(1:n-1) == dummy(2:n)))) = []; + c(idx(dummy(1:n-1) == dummy(2:n))) = []; ## Reshape if necessary. if (size (c, 1) != 1 && size (b, 1) == 1) c = c.'; diff -r 2289cafef60d -r b3478d7a0486 scripts/specfun/factorial.m --- a/scripts/specfun/factorial.m Thu Aug 24 16:23:12 2006 +0000 +++ b/scripts/specfun/factorial.m Thu Aug 24 17:09:18 2006 +0000 @@ -31,7 +31,7 @@ if (isscalar (n)) x = prod (2:n); else - n (find (n < 1)) = 1; + n (n < 1) = 1; m = max (n(:)); c = cumprod (1:m); x = c(floor (n));