MATLAB Answers

Symetric matrix power optimization

조회 수: 3(최근 30일)
Damien GUILLOTIN
Damien GUILLOTIN 2021년 4월 29일
댓글: Damien GUILLOTIN 2021년 4월 30일
Hello,
I would like to calculate A^p where A is a symetric matrix. I know that I can use A^p but i would like to know is there is way to calculate only (n²+n)/2 coefficients and just paste the (n²-n)/2 last that are equals ? Or simply do this optimization for A*B where A and B are both symetrics ?
Thank you :)
  댓글 수: 4
Damien GUILLOTIN
Damien GUILLOTIN 2021년 4월 30일
Exact hehe ! When the words go faster than your maths... it happens ^^

댓글을 달려면 로그인하십시오.

채택된 답변

Bruno Luong
Bruno Luong 2021년 4월 30일
편집: Bruno Luong 2021년 4월 30일
Youeu can edit MATLAB function mpower.m and try to the basic calculation (line 76 in my case)
D = D*D; % I assume p is integer in your case
With multiplicationfor triu elements then reflect.
However I would doubt you could beat MATLAB generic matrix product.

추가 답변(1개)

Jan
Jan 2021년 4월 29일
Are you using this already:
Do you have a C compiler such that you can try to modify the above solutions and call LAPACK:DSYMM instead of DGEMM?
  댓글 수: 2
Bruno Luong
Bruno Luong 2021년 4월 30일
I revisit mpower2 and all the speed up around 2010 when the FEX is publiseh becomes very little now wth R2021a.

댓글을 달려면 로그인하십시오.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by