Question 4.12: Using MATLAB, plot the voltage V(x) = e^-x² and the electric...

Using MATLAB, plot the voltage V(x) = e^{ -x^{2}} and the electric field E_{x}(x) = -dV / dx as a function of x in the range – 3 ≤ x ≤ 3.

 

The blue check mark means that this solution has been answered and checked by an expert. This guarantees that the final answer is accurate.
Learn more on how we answer questions.

The difference operation diff(V)./diff(x) sequentially performs and stores the values

\left\{\frac{V(2) – V(1)}{h} , \frac{V(3) – V(2)}{h},…,\frac{V(n) – V(n-1)}{h}\right\}

There are only (n – 1) values of the derivatives. Therefore, if we wish to plot the results, we plot V in the range x_{0} to x_{b} at increments of h and dV / dx in the range x_{a} + h / 2 to x_{b} – h / 2 with the same increment h. The plots of the potential and the electric fields are shown in the figure below.

4.12

Related Answered Questions

Question: 4.20

Verified Answer:

From Example 4-19 we obtained the S-matrix of the ...