Matrices multiplication can be element by element or vector multiplication. For element by element, which I assume you want, the operator is
Secondly, ln is not a function in matlab. Use log.
Thirdly, I think you want x to be from 0 to 3. whatever you have written will create 4 elements. [0 1 2 3]. I am assuming that you want to do [0:0.1:3]
Fourthly, are you sure you want the difference and not the derivative.