home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / sys / hp48 / 7387 < prev    next >
Encoding:
Internet Message Format  |  1993-01-27  |  1.6 KB

  1. Path: sparky!uunet!destroyer!gatech!darwin.sura.net!aurora.LaTech.edu!ramos
  2. From: ramos@engr.LaTech.edu (Alex Ramos)
  3. Newsgroups: comp.sys.hp48
  4. Subject: Re: Attention!! Experienced HP48 programer!!!!
  5. Date: 26 Jan 1993 16:51:36 GMT
  6. Organization: Louisiana Tech University
  7. Lines: 39
  8. Distribution: usa
  9. Message-ID: <1k3q6pINNqpv@aurora.engr.LaTech.edu>
  10. References: <C1E6o2.2os@ulowell.ulowell.edu>
  11. NNTP-Posting-Host: atlantis.engr.latech.edu
  12. X-Newsreader: TIN [version 1.1 PL8]
  13.  
  14. Gerry Vahe (gvahe@cs.ulowell.edu) wrote:
  15. : I'm just currious if someone out there can help me.  I am interested in writing a program to calculate the following Matrix:
  16.  
  17. : [cos x   -sin x   0
  18. :  sin x    cos x   0
  19. :   0         0     1]
  20.  
  21. : I would like to be able to enter the angle for x, and have the good ole hp do the rest.  I know this is probably pretty easy, but I'm not that experienced with the Hp programing language!
  22.  
  23. : I would read the book, but with my course load this semester, I really dont have the time to learn a new language.  If someone wouldnt mind, could you lend me a hand???  Thanks a lot for your time, its much appreciated!!
  24. : -gerry
  25.  
  26. Try this, it'll work:
  27.  
  28. << -> X
  29.    <<
  30.       X COS X SIN NEG 0
  31.       X SIN X COS 0
  32.       0 0 1
  33.       [ 3 3 ] ->ARRY
  34.       DET
  35.    >>
  36. >>
  37.  
  38. Type this in and store it in a variable (call it WRO, for example).
  39. Then suppose you want to calculate it for X=4, you type:
  40.  
  41.       4 WRO
  42.  
  43. Differential equations class, right? Wish I had the HP when I took it!
  44.  
  45. --
  46.  
  47. /* ramos@engr.Latech.edu                     
  48.                                             
  49.                 Fala-se Portugues, tche!     
  50.         English spoken here.
  51. */ 
  52.  
  53.