home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / lang / apl / 1307 < prev    next >
Encoding:
Internet Message Format  |  1993-01-12  |  2.2 KB

  1. Path: sparky!uunet!psinntp!kepler1!andrew
  2. From: andrew@rentec.com (Andrew Mullhaupt)
  3. Newsgroups: comp.lang.apl
  4. Subject: Re: Matrix Inverse in APL2
  5. Message-ID: <1474@kepler1.rentec.com>
  6. Date: 12 Jan 93 20:25:45 GMT
  7. References: <C0puI4.Mv6@undergrad.math.waterloo.edu>
  8. Organization: Renaissance Technologies Corp., Setauket, NY.
  9. Lines: 36
  10.  
  11. In article <C0puI4.Mv6@undergrad.math.waterloo.edu> bdcrafto@cayley.uwaterloo.ca (Brad Crafton) writes:
  12. >HELP!!  For a project I'm doing for work I require a routine to take the
  13. >Inverse of a very large matrix (in the order of 1000x1000).  The 
  14. >Matrix Inverse function tends to bomb out at even a 10x10 matrix.
  15.  
  16. That doesn't sound like APL2's fault. APL2 uses Householder QR with
  17. column pivoting, so you may have a singular matrix in the 10x10 case,
  18. in which case you might be best served by: 1. thinking about the matrix
  19. to make sure it should have an inverse, 2. possibly using SVD to compute
  20. the pseudo-inverse.
  21.  
  22. >I am assuming that some sort of Gaussian Elimination routine is
  23. >needed.  Is there somewhere where I could find a pre-written routine?
  24.  
  25. There are lots of places, but you should not so quickly assume that
  26. Gaussian elimination is a good idea.
  27.  
  28. >I realize that for a matrix so large, it would probably take a LONG
  29. >time to run.  But could anyone guestimate what kind of time I'm
  30. >looking at?  Minutes?  Hours?  If it means anything, most of the
  31. >entries in the matrix will be zero.
  32.  
  33. You should probably take advantage of the large number of zeros, (in the
  34. jargon you may have a 'sparse' matrix). The best thing there is to
  35. skip using APL at all and find a routine which may be suited to your
  36. particular matrix which can perhaps be used from within APL2. In order
  37. to get more out of the Internet, you should probably post a non-APL
  38. specific query with a reasonable description of your matrix problem to
  39. sci.math.num-analysis. Two books you should get some handle on, although
  40. you may need some elementary numerical analysis books before you can
  41. get very far, are Golub and van Loan's _Matrix Computations_ and Hanson
  42. and Lawson's _Solving Least Squares Problems_, although Golub and van
  43. Loan mostly supercedes Hanson and Lawson.
  44.  
  45. Later,
  46. Andrew Mullhaupt
  47.