MATLAB: How to plot lnx

lnxlogarithmploturgent

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 ?

Best Answer

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