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 ?!
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.
Re: Derivative vector on Eigen arithmetic sequence
Quote:
Originally Posted by
ChrisW67
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 ...
Code:
Came.col(3)= A(seqN(2,A.rows(),1),13) - (A(seqN(0,A.rows(),1), 13));
Re: Derivative vector on Eigen arithmetic sequence
Quote:
Originally Posted by
benver
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