1. Originally Posted by ramdrop
I got a very nice plot, thanks, so I guess I do the same for the next part of the file?
As it happens you don't need to, at the command prompt now type:

Code:
>>plot(x,(f(x+0.1)-f(x))/0.1,'r')
>>plot(x,(f(x+0.01)-f(x))/0.01,'g')
>>plot(x,(f(x+0.001)-f(x))/0.001,'b')
>>plot(x,(f(x+0.0001)-f(x))/0.0001,'m')
If you want them on the same plot you will need

Code:
>>hold on
before hand, (and sort out axes)

CB

2. But what about the derivative? Im trying to differentiate the function, maybe its not being shown as well because the original is $\displaystyle e^x$

If it was for say, $\displaystyle x^2$:

function [y]=f(x)
y=exp(x);

then...

>>x=[-10:0.5:10]
>>y=f(x)
>>plot(x,y);
then, i want to plot the derivative, and approximate it... using the values of x = 0.01, 0.001.. .etc, so the fd(x) is needed.

3. Originally Posted by ramdrop
But what about the derivative? Im trying to differentiate the function, maybe its not being shown as well because the original is $\displaystyle e^x$

If it was for say, $\displaystyle x^2$:

then...

then, i want to plot the derivative, and approximate it... using the values of x = 0.01, 0.001.. .etc, so the fd(x) is needed.