Question: 1) Write Matlab code to implement the Crank-Nicolson method to solve the one-dimensional heat equation combined with the boundary conditions u(t,0) a(t) u(t, 1) =

1) Write Matlab code to implement the Crank-Nicolson method to solve the one-dimensional heat equation combined with the boundary conditions u(t,0) a(t) u(t, 1) = (t) and initial condition u(0, z) = g(x). Here c is a positive constant. Note that the boundary condition functions and are not constant: they are functions of t. Employ the proper tridiagonal solving strategy. Use Matlab's contourf and colorbar commands to illustrate your results
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
