# HG changeset patch # User Rik # Date 1431442902 25200 # Node ID cc5ffacb15ab399684d5172688ce6ba0615dfa5a # Parent 2ae4a7ef4378cf5b0d105273491bd983d7b60bf2 normest.m: Fix function to run with sparse complex inputs (bug #45080). * normest.m: Convert trace value to full (non-sparse) before using it to set the rand seed. diff -r 2ae4a7ef4378 -r cc5ffacb15ab scripts/linear-algebra/normest.m --- a/scripts/linear-algebra/normest.m Mon May 11 22:13:08 2015 -0700 +++ b/scripts/linear-algebra/normest.m Tue May 12 08:01:42 2015 -0700 @@ -55,7 +55,7 @@ tol = max (tol, eps (class (A))); ## Set random number generator to depend on target matrix v = rand ("state"); - rand ("state", trace (A)); + rand ("state", full (trace (A))); ncols = columns (A); ## Randomize y to avoid bad guesses for important matrices. y = rand (ncols, 1);