Results 1 to 2 of 2

Thread: QMatrix Inverted

  1. #1
    Join Date
    Dec 2017
    Posts
    12
    Thanks
    2
    Qt products
    Qt5
    Platforms
    Windows

    Default QMatrix Inverted

    I would like to do an inverse of a matrix. I read the QMatrix document (http://doc.qt.io/archives/qt-4.8/qmatrix.html#inverted). They have this inverted function. According to the doc, it supposes to return an inverted copy of the matrix, but it also mentions about returning boolean. How does this work?

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: QMatrix Inverted

    If the matrix can be inverted successfully, then the boolean value is set to true and the inverted matrix is returned. If the matrix is singular (or degenerate), then its determinate is zero and it is non-invertible. If the matrix is not square, it is non-invertible. In this case, the function sets the boolean to false. As the docs say, if the matrix is non-invertible, then the method returns the identity matrix and the boolean is set to false.

    Wikipedia explains it in more detail.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

  3. The following user says thank you to d_stranz for this useful post:

    muykim (19th January 2018)

Similar Threads

  1. Inverted QTextEdit
    By TMan in forum Qt Programming
    Replies: 2
    Last Post: 31st July 2009, 16:35
  2. QWTdial inverted range
    By jmsbc in forum Qwt
    Replies: 1
    Last Post: 12th January 2009, 21:21
  3. QTransform vs QMatrix
    By maverick_pol in forum Qt Programming
    Replies: 7
    Last Post: 4th October 2007, 10:53
  4. QMatrix
    By Gopala Krishna in forum General Discussion
    Replies: 1
    Last Post: 7th May 2007, 16:52
  5. QMatrix vs QWMatrix - porting Qt3 to Qt4
    By bitChanger in forum Qt Programming
    Replies: 13
    Last Post: 24th April 2006, 18:27

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.