Results 1 to 4 of 4

Thread: Derivative vector on Eigen arithmetic sequence

  1. #1
    Join Date
    Apr 2020
    Posts
    6
    Qt products
    Qt5
    Platforms
    Windows

    Default Derivative vector on Eigen arithmetic sequence

    Hi the board

    I've now a problem that i cant solve for many days on derivative vector

    I've installed Eigen librairy and then i put some CSV data to a dynamic matrix, this part works
    I can also find maximum of column, and parse the matrix with eigen::arithmeticsequence ( it was no more installed on 3.3.7...it was little hard to manage) but now i can do it

    The problem is that i have to make a derivative of vector on another vector i will give sample example

    matrix A 3x3 : 1 2 3
    4 5 4
    5 6 7

    i have to make derivative 1st colum on third : like (5-1)/(7-3)
    The problem i need to make it as sequence with (n-(n-2))/ (n-(n-2)) in automatic sequence...
    I cant find any function in eigen to make easy derivative.... that's easy to sum ou minus column but cell by cell i cant solve any idea ?!

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Derivative vector on Eigen arithmetic sequence

    This has nothing to do with Qt.

    I suggest you ask on an Eigen mailing list or IRC channel where someone will likely know the tool and understand enough of the mathematics to understand your question.

  3. #3
    Join Date
    Apr 2020
    Posts
    6
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Derivative vector on Eigen arithmetic sequence

    Quote Originally Posted by ChrisW67 View Post
    This has nothing to do with Qt.

    I suggest you ask on an Eigen mailing list or IRC channel where someone will likely know the tool and understand enough of the mathematics to understand your question.
    May be it has nothing to do with qt .... but i'm coding on qt .... and moreover very hard to get any information about eigen on QT....

    So after some hours i have found the solution, so i publish it to help may be some ppl in future

    On Eigen need to install ArithmeticSequence.h ( little hard because some version hasnt got it, not to add manually it)

    Then you should have a command called seqN

    Here for example, the column 3 of matrix called Came and the code means Sequence from cell 2 ( so line 3), on all rows of A, with increment 1, on column 13, minus second sequence ...

    Qt Code:
    1. Came.col(3)= A(seqN(2,A.rows(),1),13) - (A(seqN(0,A.rows(),1), 13));
    To copy to clipboard, switch view to plain text mode 

  4. #4
    Join Date
    Jul 2008
    Location
    Germany
    Posts
    503
    Thanks
    11
    Thanked 76 Times in 74 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Derivative vector on Eigen arithmetic sequence

    Quote Originally Posted by benver View Post
    May be it has nothing to do with qt .... but i'm coding on qt .... and moreover very hard to get any information about eigen on QT....
    I think this is a common misconception, although I'm not sure where it comes from.
    Qt is just a C++ library like any other library. So Qt does not influence the usage of other libraries in any way, and problems that you have with another library are normally not Qt-related, even if you also use the Qt libraries in your program. You probably wouldn't ask Qt questions on the Eigen forum/mailing list/IRC channel just because you use them in the same program.

    Ginsengelf

Similar Threads

  1. arithmetic operations in QT
    By anand_ktd in forum General Programming
    Replies: 1
    Last Post: 21st December 2016, 19:58
  2. Replies: 4
    Last Post: 18th May 2014, 15:24
  3. Define a QRegExp containing arithmetic operators
    By aaditya190 in forum Newbie
    Replies: 1
    Last Post: 4th December 2013, 12:38
  4. Replies: 2
    Last Post: 10th September 2013, 11:37
  5. implementing sizeHint in a QItemDelegate derivative
    By momesana in forum Qt Programming
    Replies: 2
    Last Post: 5th May 2010, 22:59

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.