Mercurial > octave
comparison scripts/testfun/assert.m @ 17690:79d6af38b96f
Backout cset 1d41b1910531 now that problem with real/image for sparse fixed.
* scripts/testfun/assert.m: Undo special treatment of sparse matrices.
author | Rik <rik@octave.org> |
---|---|
date | Fri, 18 Oct 2013 14:25:29 -0700 |
parents | 1d41b1910531 |
children | d63878346099 |
comparison
equal
deleted
inserted
replaced
17689:dd8db3f1c1da | 17690:79d6af38b96f |
---|---|
282 A_null_imag = imag (A); | 282 A_null_imag = imag (A); |
283 B_null_imag = imag (B); | 283 B_null_imag = imag (B); |
284 exclude = errseen | ! isfinite (A_null_imag) & ! isfinite (B_null_imag); | 284 exclude = errseen | ! isfinite (A_null_imag) & ! isfinite (B_null_imag); |
285 A_null_imag(exclude) = 0; | 285 A_null_imag(exclude) = 0; |
286 B_null_imag(exclude) = 0; | 286 B_null_imag(exclude) = 0; |
287 if (issparse (A) || issparse (B)) | 287 A_null = complex (A_null_real, A_null_imag); |
288 A_null = sparse (complex (full (A_null_real), full (A_null_imag))); | 288 B_null = complex (B_null_real, B_null_imag); |
289 B_null = sparse (complex (full (B_null_real), full (B_null_imag))); | |
290 else | |
291 A_null = complex (A_null_real, A_null_imag); | |
292 B_null = complex (B_null_real, B_null_imag); | |
293 endif | |
294 if (isscalar (tol)) | 289 if (isscalar (tol)) |
295 mtol = tol * ones (size (A)); | 290 mtol = tol * ones (size (A)); |
296 else | 291 else |
297 mtol = tol; | 292 mtol = tol; |
298 endif | 293 endif |