How can I write log(e) in MATLAB?

90 次查看(过去 30 天)
I am trying to calculate x=log(e) but I can not. Any help?
  6 个评论
Walter Roberson
Walter Roberson 2021-4-16
f = @(x) 4.^x - 256;
log4_256 = fzero(f, 1.2345)
log4_256 = 4
4^log4_256
ans = 256

请先登录,再进行评论。

采纳的回答

David Fletcher
David Fletcher 2018-4-15
I assume you mean log10? In Matlab log is base e, so log(e)=1
x=log10(exp(1))
  6 个评论
sultana saffi
sultana saffi 2021-4-16
can you help with this pleas x=log4(256)
John D'Errico
John D'Errico 2021-4-16
@sultana saffi Please stop spamming this question with answers and comments to compute a log to do your homework.
Do you know the basic rule for logs to other bases?
The formula is given here:

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Data Type Conversion 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by