Matrix Logarithm in Base 2

*爱你&永不变心* 提交于 2019-12-11 05:38:15

问题


Logm() takes the matrix logarithm, and log2() takes the logarithm base 2 of each element of a matrix.

I'm trying to compute the Von Neumann entropy, which involves the base 2 matrix logarithm. How do I do this?


回答1:


If you define the matrix exponential "with base 2" as B = expm(log(2) .* A), or if you analogously directly define the matrix logarithm "with base 2" via an eigendecomposition with the standard logarithm of base 2 applied eigenvalue-wise, then you can obtain a corresponding base 2 matrix logarithm by dividing by log(2):

A = logm(B) ./ log(2)


来源:https://stackoverflow.com/questions/41528129/matrix-logarithm-in-base-2

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!