Ken Iverson writes :

Quote:

> NB. I would like to see the posting of more

> NB. well-defined problems (such as the diag-

> NB. onal and band matrices posted by Faust),

> NB. together with executable treatments of

> NB. them in any or all dialects of APL. Here

> NB. is a treatment of band matrices in J:

One such well defined problem comes about in the

derivation of the psuedo inverse based upon the

SVD. You have a rectangular matrix, n by m, which

is all zeros except along the diagonal. The diagonal

entries are real (actually, complex in the general case).

The (i,i)th entries of the matrix to be formed are the

reciprocals of the (i,i)th entries of the old matrix

except in the case of being either zeros or machine zeros

whose tolerance value is specified. For example, both

3 0 0

0 4 0

0 0 1e_40

0 0 0

and

3 0 0

0 4 0

0 0 0

0 0 0

with tolerance 1e_30 become :

0.333333 0 0 0

0 0.25 0 0

0 0 1 0

-e