One-dimensional heat flow

In one-dimensional heat flow how does the temperature vary with time? Show your solution and write a Matlab script to solve the problem.

Sample Solution