Help with Matlab Question
Show that the limit as x approaches 0 (e^x - 1) / x = 1
Do this by first creating a vector x that has some elements: 1 .5 .1 .01 .001 .00001 .0000001. Then create a new vector y in which each element is determined from the elements of x by (e^x - 1)/x . Compare the elements of y with the value 1 (use format long to display the numbers)
I put this in
x = [ 1 .5 .1 .01 .001 .0001 .0000001 ]
y = (exp(x)-1)/(x)
But it only returns when x= 1
I'm new to Matlab
Do this by first creating a vector x that has some elements: 1 .5 .1 .01 .001 .00001 .0000001. Then create a new vector y in which each element is determined from the elements of x by (e^x - 1)/x . Compare the elements of y with the value 1 (use format long to display the numbers)
I put this in
x = [ 1 .5 .1 .01 .001 .0001 .0000001 ]
y = (exp(x)-1)/(x)
But it only returns when x= 1
I'm new to Matlab
0
Comments
The / sign is a linear operator. Try using ./ instead of /