필터 지우기
필터 지우기

Exponential of big numbers

조회 수: 3 (최근 30일)
Arianna Menardi
Arianna Menardi 2020년 4월 27일
답변: Arianna Menardi 2020년 5월 1일
Dear Experts,
I need to compute the following formula: M= expm(atilde*T).
However, the atilde*t results in a matrix of big numbers and when I do the expm matlab gives back a matrix of NaN as it is not able to handle them (from my understanding). I tried with vpi from this toolbox (https://www.mathworks.com/matlabcentral/fileexchange/22725-variable-precision-integer-arithmetic) by doing M=expm(vpi(atilde*T)) but it doen't work as it gives me back the error that expm requires input of type double or single and instead the type is VPI.
Does anyone has a suggestion on how to deal with this problem?
Thank you so much!
Arianna
  댓글 수: 1
Steven Lord
Steven Lord 2020년 4월 27일
How big are your "big numbers" in terms of magnitude?
Can you show a representative (small in terms of number of elements) matrix atilde*T?

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

답변 (2개)

David Hill
David Hill 2020년 4월 27일
Try:
M=expm(vpa(atilde*T));

Arianna Menardi
Arianna Menardi 2020년 5월 1일
Dear all, thank you for your suggestions! I actually found out that I needed to stabilize my matrix (dividing it by its max eigenvalue). Scaling it enabled my matlab to compute the code.
All the best

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by