I am at the beginning of learning how to use MatLab, and I am trying to plot the original $e^x$ and $e^x$ through Horner Method together in one plot. I consulted one instructor at the math department and he gave me some hints saying that I should follow the two pictures of codes below:
After trying them, I still met many errors in MatLab, so many that I didn't take records of them. So I am wondering that whether someone here can help me with writing the codes or just give me some hints. Thanks very much!


Just write
giving the answer $2.718278...$ to be compared to the exact value $e^{1}=2.7182818$ : a $4 \times 10^{-5}$ discrepancy.
Please note the construction
k=8:-1:1with step -1. Besides, no need for points in front of*and/symbols because we operate on numbers, not lists.This formula works as well for complex numbers : if, instead of $x=1$, one sets $x=i*\pi/2$, the result is
$0.0000247 + 0.9998431 i$, very close to the exact value $e^{i \pi/2}=i$.
The same program can also be used for computing exponential of matrices. Try it and compare your result with
expm(x).