Zeros in the database


Zeros in the database can cause a number of problems, such as numerical errors traceable to:

division by zero

log of zero

raising zero to a power

singular matrix errors

Usually you can arrange your TABLO code to work around these problems. A better idea, in many cases, is to replace trouble-making zeros in the data file by a tiny number, say 1.0E-20.

The options dialog in ViewHAR allows you to see on the contents page how many zeros each real matrix contains. Or, right-click on the matrix in Contents view and choose Properties to see a count of zero elements.

If you are in advanced (editing) mode you can also right-click on the matrix in Contents view and choose the option of replacing zeros in the selected matrix with a tiny number. A dialog allows you to set a tiny value A. If you click OK, all values with absolute value < A will be set to A.

Alternatively, a second menu option allows you to set all values with absolute value < A to zero. This might be useful if you wanted to make the matrix more sparse.

For batch processes, a command line program, TinyHAR, is supplied which can perform either task on all headers or on specified headers only.



URL of this topic: www.copsmodels.com/webhelp/viewhar/hc_replacezeros.htm

Link to full GEMPACK Manual

Link to GEMPACK homepage