Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [SOLVED] Matrix division
Forum Updated to NodeBB v4.3 + New Features

[SOLVED] Matrix division

Scheduled Pinned Locked Moved General and Desktop
7 Posts 2 Posters 2.4k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    avmg
    wrote on 20 Aug 2014, 10:34 last edited by
    #1

    Hi,

    I'm trying to calculate the division between to matrix. I start usin Qgenericmatrix, but i found the trouble that is not possible to create a dynamic size matrix.

    So, Does anybody know any library or some suggestion to calculate matrix divisions with dynamic sizes???

    Thanks for help,
    avmg

    1 Reply Last reply
    0
    • J Offline
      J Offline
      JohanSolo
      wrote on 20 Aug 2014, 11:24 last edited by JohanSolo
      #2

      First, there is no such operation as matrix division. What you can do is multiply by the matrix's inverse, assuming it exists.

      Matrices with an existing inverse are squared and their determinant is non-zero (see general linear group). This leads to the fact that the inverse (when it exists) has the same dimension. Therefore I don't see why you want a dynamic size... What you can do is a partial specialisation of the QGenericMatrix class, with equal number of columns and rows, add a check for the determinant and an invert method.

      `They did not know it was impossible, so they did it.'
      -- Mark Twain

      1 Reply Last reply
      0
      • A Offline
        A Offline
        avmg
        wrote on 20 Aug 2014, 11:40 last edited by
        #3

        Hi,

        Yes i know the theory, but i just ask if there's any library to do it (matrix inverse, product...) About the dynamic size, i have data from sensors and the matix size depend on the sensor. I have other solutions, but i searched and ask to find a good one.

        Thanks for reply!

        1 Reply Last reply
        0
        • J Offline
          J Offline
          JohanSolo
          wrote on 20 Aug 2014, 11:52 last edited by JohanSolo
          #4

          Hi,

          I personally use boost to perform matrices operations. There are also plenty other libraries to do so, lapack is a well-known one, root may be another and overkilling one...

          `They did not know it was impossible, so they did it.'
          -- Mark Twain

          1 Reply Last reply
          0
          • A Offline
            A Offline
            avmg
            wrote on 20 Aug 2014, 12:00 last edited by
            #5

            I just found now armadillo library, Any experience in comparison with the boost mentioned above?

            Thanks

            1 Reply Last reply
            0
            • J Offline
              J Offline
              JohanSolo
              wrote on 20 Aug 2014, 12:07 last edited by
              #6

              I don't know this library.
              Apparently it relies on lapack which is existing for a long time, and thus quite reliable. They say the API is matlab like, which I personally am not found of, but may mean that it is more user-friendly that boost's.

              Boost heavily relies on templates, which cause the syntax to be kind of cumbersome and obscure at first glimpse.

              `They did not know it was impossible, so they did it.'
              -- Mark Twain

              1 Reply Last reply
              0
              • A Offline
                A Offline
                avmg
                wrote on 20 Aug 2014, 12:11 last edited by
                #7

                I found also a performance test comparing diferent libraries and the armadillo looks like one of the bests, so i will try it.

                Ok thanks so much for help me!

                1 Reply Last reply
                0

                1/7

                20 Aug 2014, 10:34

                • Login

                • Login or register to search.
                1 out of 7
                • First post
                  1/7
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved