2.7: Numerical Experiment (Approximating e^jθ)
- Page ID
- 10097
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)
We have demonstrated that the function \(e^{jθ}\) has two representations:
- \(e^{jθ}=\lim_{n→∞}(1+\frac {jθ} n)^n\) ; and
- \(e^{jθ}=\lim_{n→∞}∑_{k=0}^n\frac {(jθ)^k} {k!}\)
In this experiment, you will write a MATLAB program to evaluate the two functions \(f_n\) and \(S_n\) for twenty values of n:
- \(f_n=(1+\frac {jθ} n)^n,\;n=1,2,...,20\) ; and
- \(S_n=∑^n_{k=0}\frac {(jθ)^k} {k!},\;n=1,2,...,20k\)
Choose \(θ=π/4(=\mathrm{pi}/4)\). Use an implicit for
loop to draw and plot a circle of radius 1. Then use an implicit for loop to compute and plot \(f_n\) and an explicit for
loop to compute and plot \(S_n\) for n=1,2,...,100. You should observe plots like those illustrated in the Figure. Interpret them.