This problem has three parts to it. Parts A and B can be solved on paper. Part C requires a MATLAB scripting. I have attached the necessary three documents.

*** For Part [A & B]: the solution is
T(x,t) = Sum T_G(x - (nL+(-1)^n x_o), t)

For Part [C]: Please make a plot of T(x,t) vs x vs t and a plot of
x vs t using N=61 and tau=1.0e-4 s.

The attached pdf file explains the answers to questions A and B, and the attached Matlab script is the dftcs script modified as requested.

The spacial discretization x_i = (i-3/2)h - L/2, with h = L/(N-2) is chosen so that the first two points are at x_1 = -L/2-h/2 and x-2 = -L/2 + h/2, symmetric with respect to the boundary at which the MIRROR boundary condition is imposed (Neumann condition with 0 derivative), and the same goes for the last two points at x_(N-1) = L/2-h/2 and x_N = L/2+h/2.

=======================

TEX:
centerline{bf Diffusion with Neumann boundary conditions}

Given diffusion equation
$$
{p Tover p t} = kappa{p^2Toverp x^2},
eqno(0.1)
$$
the solution for intitial condition
$$
T(x,0) = delta(x-x_o)
eqno(0.2)
$$
on boundless X-axis, $-infty<x<infty$ is the Green function
$$
T_G(x-x_o,t) = {1oversqrt{2pikappa t}}e^{-{(x-x_o)^2over 4kappa t}}.
eqno(0.3)
$$
If the solution is limited to ...

Solution Summary

With good explanations and calculations, the problems have been solved.

... Is the system stable? Explain. b. Compute the step response using MATLAB commands like conv and residue. ... Use the command semilogx to make your plots. ...

... programming skills by solving some of the problems in the ... There are some MATLAB hints at the end. Make sure you understand the questions before you start coding ...

... Certain adjustments need to be made within the MATLAB figure export setup to achieve better ... Include answers for Problems and include MATLAB coding along ...

... using nonlinear regression: a.) first using Matlab Â“fminsearchÂ” b ... xk + tsk , where t chosen to make sure that F ... 11.2 Quasi-Newton methods Problem: Given F (x ...

... The problem is to linearize the Lorenz equations and then to ... The code may not use any built in Matlab functions or ... the run time is so large, so I made a copy ...

... You can use the Matlab meshgrid and contour functions to plot... (b) This least squares problem is nearly ... program will be as follows: Comments will be made on a ...

... The attached Matlab script has examples of how to plot error bars and how ... Note that I ADDED ERRORS to you original data to make the illustration more visible ...

... Please see attached files for full problem description. ... Show all that you type into the MATLAB command window ... 1. Use the function linspace to create a vector of ...

This solution comprises of two problems solved with matlab code ... Use MATLAB to plot x[n] and choose an appropriate ... under what condition the value of makes x[n ...

... What observation can you make about the relationship between ... Course Documents > Learning Units > 4-Matlab > vapour_pressure.dat ... C. b) There is an error in the ...