Help!I have no idea how to type the inverse Matrix and Matrix command.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • SpeedMath
    New Member
    • Jun 2008
    • 10

    Help!I have no idea how to type the inverse Matrix and Matrix command.

  • kaarthikeyapreyan
    New Member
    • Apr 2007
    • 106

    #2
    For working with matrices you could download and use the numpy module
    and for finding out the inverse of a matrix of dimensions 2x2
    you could use this for your personal computations

    Code:
    A = [[a,b],
         [c,d]]
    inverse A = 1/det (A) [[d,-b],
                          [-c, a]]
    where det (A) = ad - bc

    Comment

    • SpeedMath
      New Member
      • Jun 2008
      • 10

      #3

      Comment

      • SpeedMath
        New Member
        • Jun 2008
        • 10

        #4
        Originally posted by kaarthikeyaprey an
        For working with matrices you could download and use the numpy module
        and for finding out the inverse of a matrix of dimensions 2x2
        you could use this for your personal computations

        Code:
        A = [[a,b],
             [c,d]]
        inverse A = 1/det (A) [[d,-b],
                              [-c, a]]
        where det (A) = ad - bc
        I am a beginner to use Python.
        Can you teach me how to find the numpy module and download which particular part of it?
        Thanks a lot.
        I appreaciate you.

        Regards.

        Comment

        • Laharl
          Recognized Expert Contributor
          • Sep 2007
          • 849

          #5
          Google 'numpy' and the first result is the numpy homepage. There's download links there. I can't help you with using it, as I've never used it myself, though.

          Comment

          • jlm699
            Contributor
            • Jul 2007
            • 314

            #6
            Originally posted by SpeedMath
            Can you teach me how to find the numpy module.
            You go to this little web site called Google.

            At the top of the page is a search box, into which you enter your query (in this case NumPy).

            The results will then be displayed; the first of which is NumPy's Home page

            Comment

            • SpeedMath
              New Member
              • Jun 2008
              • 10

              #7
              Just now I found this reference.
              http://numpy.scipy.org/numpy.pdf

              I am encountering a problem.
              I am using Python25.
              In the Python25, I think I have lack of some library or something else.
              Because I couldn't Run the below command.
              Below commands adapted from http://numpy.scipy.org/numpy.pdf , page 84.



              from numpy import *
              from scipy import *


              a = reshape(arange( 25.0), (5,5)) + identity(5)
              print a

              inv_a = inverse(a)
              print inv_a

              maximum.reduce( fabs(ravel(dot( a, inv_a)-identity(5))))


              _______________ _______________ _______________ ______
              The output stated this:

              [[ 1. 1. 2. 3. 4.]
              [ 5. 7. 7. 8. 9.]
              [ 10. 11. 13. 13. 14.]
              [ 15. 16. 17. 19. 19.]
              [ 20. 21. 22. 23. 25.]]

              Traceback (most recent call last):
              File "C:/Python25/Scripts/project2.py", line 15, in <module>
              inv_a = inverse(a)
              NameError: name 'inverse' is not defined



              _______________ _______________ _______________ ____

              Why 'inverse' doesn't defined?

              Comment

              • SpeedMath
                New Member
                • Jun 2008
                • 10

                #8
                Actually my Python 2.5 inside there got the "scipy.lina lg".
                I think don't want to use that previous as my reference....
                ^^
                It is a big discovery....

                Comment

                • SpeedMath
                  New Member
                  • Jun 2008
                  • 10

                  #9
                  I couldn't find any reference regards how to plot the wind vector field via google.
                  Can anyone helps me?
                  Thanks.

                  Comment

                  Working...