I have a signal $f(t) = e^{-t} $. I know that the Laplace of this should be $\dfrac{1}{1+s}$ and the z transform should be $\dfrac{z}{z+e^{-T}}$.
I am a little confused, first off, on what the z transform of $f(t) = e^{-(t-T)} $ should look like. I assumed it would be a delay so take the previous z-transform and multiply it by $z^{-1}$. To test this theory I used MATLAB.
However, when using this code I am getting the answer as $\dfrac{0.09516}{z+0.9048}$
clear all
syms t n
T = 0.1;
ft = exp(-(t))*heaviside(t);
fs = laplace(ft)
H = tf([1],[1 1]);%,'InputDelay',0);
Hd = c2d(H,T)
So I dont want to test it with the delay because I am assuming I am using some wrong code... What am I missing?
I'm assuming that $f(t)=0$ for $t<0$ (or equivalently, $f(t) = e^{-t}u(t)$ where $u(t)$ is the unit-step function).
Then, first, the Z transform is actually
$$F(z)=\sum_{n=0}^\infty e^{-Tn} z^{-n} =\sum_{n=0}^\infty (e^{-T}z^{-1})^{n}=\frac{1}{1-e^{-T}z^{-1}}=\frac{z}{z-e^{-T}}$$
Now, if you define the delayed function $g(t) = e^{-(t-T)}u(t)$ ... this is not exactly the same as $f(t-T)$ because you are not delaying the unit-step function, that is $g(t)$ is starting at $t=0$ instead of $t=T$. (If this is what you mean).
Hence you must be careful with that.