How to plot lnx ?

22 次查看(过去 30 天)
Mohamad
Mohamad 2013-9-29
let us say
x= [0 1 2 3 4 5 6 7 8 9]
and y = ln(x)
plot (x,y ) does not work. Is y=ln(x) a wrong statement ?
  2 个评论
Titus Edelhofer
Titus Edelhofer 2013-9-29
Since I guess, y = ln(x) has thrown an error like "Undefined function or variable y" I would say, yes, this is a wrong statement. My suggestion: open the doc and search for logarithm ...
Mohamad
Mohamad 2013-9-29
I did it is not understandable

请先登录,再进行评论。

采纳的回答

Azzi Abdelmalek
Azzi Abdelmalek 2013-9-29
编辑:Azzi Abdelmalek 2013-9-29
x= [0 1 2 3 4 5 6 7 8 9]
y=log(x)
plot(x,y)
You should know that log is not defined for x=0
  2 个评论
Mohamad
Mohamad 2013-9-29
this is log, I want lnx, which acutally is logx of base e.
Azzi Abdelmalek
Azzi Abdelmalek 2013-9-29
编辑:Azzi Abdelmalek 2013-9-29
log is just the name of the function corresponding to ln(x). You can check
log(exp(1))
help log

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Exponents and Logarithms 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by