How to enhance the performance of Matalb's function sqrtm?

조회 수: 5 (최근 30일)
Muh Alam
Muh Alam 2021년 11월 22일
답변: Christine Tobler 2021년 11월 23일
I have code that involves computing the matrix square root using the
sqrtm
function and when anlyzing the code performance it turns out that this function takes about 35% of the total time of the code?
Is there anyway I can make it runs more effeciently?
Thanks and my appologies if this question appears repeated!

답변 (1개)

Christine Tobler
Christine Tobler 2021년 11월 23일
Not in general. You might be able to find a cheaper but less accurate way to compute this, but if that's acceptable would depend on what kinds of inputs you have, and what you then do with the outputs.
If the input to sqrtm is always a symmetric positive definite matrix, you might look into whether the Cholesky factor could work instead of the matrix square root, this would be cheaper to compute.

카테고리

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

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by