141 reputation
7
bio website
location France
age 27
visits member for 1 year, 9 months
seen May 19 at 9:05

Oct
7
awarded  Commentator
Oct
7
comment Riddle: 1 question to know if the number is 1, 2 or 3
It always return "I don't know"...
Oct
6
awarded  Nice Answer
Oct
4
awarded  Teacher
Oct
4
answered Riddle: 1 question to know if the number is 1, 2 or 3
Sep
23
awarded  Critic
Sep
20
comment Expressing the values of a matrix at pow N
Yes, I was also afraid of that...
Sep
20
comment Expressing the values of a matrix at pow N
I am sorry, I've made a mistake, my diagonal entries are not distinct. But I guess I can slightly change them so they become different. Would it change a lot the result if I add something like 0.0000001 when necessary?
Sep
20
revised Expressing the values of a matrix at pow N
added 59 characters in body
Sep
20
revised Expressing the values of a matrix at pow N
added 150 characters in body
Sep
20
revised Expressing the values of a matrix at pow N
added 436 characters in body
Sep
20
comment Expressing the values of a matrix at pow N
@ftfish using Gerry method allows me way better results but apparently, I am not able to use it all the time.
Sep
20
comment Expressing the values of a matrix at pow N
See this related question on Stackoverflow: stackoverflow.com/questions/18920125/…
Sep
20
comment Expressing the values of a matrix at pow N
@ftfish numpy is actually doing an Exponentiation by squaring (I have checked the source code). Thanks.
Sep
20
awarded  Editor
Sep
20
revised Expressing the values of a matrix at pow N
a, b, c in [0,1]
Sep
20
comment Expressing the values of a matrix at pow N
@GerryMyerson One other question: Am I sure that my matrix Q will not be defective? For any dimension and values of a, b, c, etc. ?
Sep
20
comment Expressing the values of a matrix at pow N
@GerryMyerson, Thanks. numpy is a Python library that allows to do linear algebra (and not only). numpy.org I assume that it needs to compute the matrices $P$ and $D$ in order to compute $Q^N$. Now that I ask him to compute $P$, $D$ and $P^{-1}$ before, it's 8 times faster to compute thousands of powers.
Sep
20
comment Expressing the values of a matrix at pow N
@GerryMyerson After writing my question, I wondered how the matrix power can be done so I'd tend to agree with your comment. But I'm wondering what is so long when I ask numpy to compute $Q^n$, could it be the time to compute the eigenvectors of Q and copying values? Maybe I could save time by doing it myself and save the $P$ and $D$ matrices (since I am computing $Q^N$ for thousands of $N$ values). Am I right to say that the eigenvalues of $Q$ are $(0, a, b, ..., 1)$ (because the matrix is triangular)?
Sep
20
awarded  Student