home *** CD-ROM | disk | FTP | other *** search
- function e = zcheck(x)
- %ZCHECK ZCHECK checks to see if a result is 0.
- % ZCHECK(X) is used to test that a result is 0
- % to within sqrt(eps) and issues an error if not.
- %
-
- % Copyright (c) 1990 by the MathWorks, Inc.
- % Written by John N. Little, 12-8-84.
-
- if min(size(x)) == 0
- error([7,'Somebody returned a NULL matrix'])
- end
- if any(any(isnan(x)))
- error([7, 'Somebody returned a NaN'])
- end
- e = norm(x,1);
- if (e > sqrt(eps))
- Residual_norm = e
- error([7, 'Residual greater than sqrt(Eps)'])
- end
-