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

1) Write Matlab code to implement the Crank-Nicolson method to solve the one-dimensional heat equation Cusz combined with the boundary conditions u(t, 0) = a(t) and initial condition u(0,)g) 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. 2) Repeat exercise 1) above, but thie time use the boundary conditions u (4,0) = a(t) Use the "fictitious node" technique for the Neumann boundary condition. 1) Write Matlab code to implement the Crank-Nicolson method to solve the one-dimensional heat equation Cusz combined with the boundary conditions u(t, 0) = a(t) and initial condition u(0,)g) 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. 2) Repeat exercise 1) above, but thie time use the boundary conditions u (4,0) = a(t) Use the "fictitious node" technique for the Neumann boundary condition
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
