File: resid.m

package info (click to toggle)
ufsparse 1.2-7
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 27,536 kB
  • ctags: 5,848
  • sloc: ansic: 89,328; makefile: 4,721; fortran: 1,991; csh: 207; sed: 162; awk: 33; java: 30; sh: 8
file content (6 lines) | stat: -rw-r--r-- 228 bytes parent folder | download
1
2
3
4
5
6
function resid (A, x, b)
% resid (A, x, b), print the relative residual,
% norm (A*x-b,inf) / (norm(A,1)*norm(x,inf) + norm(b,inf))

fprintf ('resid: %8.2e\n', ...
    norm (A*x-b,inf) / (norm(A,1)*norm(x,inf) + norm(b,inf))) ;