How to calculate the base 2 log of a matrix?

允我心安 提交于 2020-01-24 16:02:43

问题


The only function that I found that calculates the log of the matrix, and not of each component of the matrix, was scipy's logm() function, but it finds the log with base e, I need the base 2 log.


回答1:


You can use the change-of-base formula to convert the base of the logarithm:

log2(x) = logm(x) / logm(2)

Mathematica StackExchange has some more in depth discussion of the math behind this:

https://mathematica.stackexchange.com/a/92293



来源:https://stackoverflow.com/questions/54773370/how-to-calculate-the-base-2-log-of-a-matrix

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