Precise Matrix Power: A^k
조회 수: 6 (최근 30일)
이전 댓글 표시
Hello,
I am currently fighting with (more than) double-precision numerics, with which I am not familiar, so the answer probably lies within this topic. I would like to calculate
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/242627/image.png)
with
and
but obviously the precision of
will be bad for big k. Is there a datatype of which I am not aware, or any other trick that will help me? Thanks in advance. :)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/242628/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/242629/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/242630/image.png)
댓글 수: 0
채택된 답변
Rik
2019년 10월 14일
It will probably be helpfull to use the Symbolic Math Toolbox, and use the tips explained here. For mod(a^b,k) there is a direct function, but for your use case there doesn't seem to exist one.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!