How to plot lnx ?

조회 수: 19 (최근 30일)
Mohamad
Mohamad 2013년 9월 29일
댓글: Azzi Abdelmalek 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