Question: Consider the 1D heat equation ut = uxx, 0 < x < Pi, t < 0 Initial temperature u(x, 0) given by the continuous piecewise
Consider the 1D heat equation ut = uxx, 0 < x < Pi, t < 0 Initial temperature u(x, 0) given by the continuous piecewise linear function with slope Pi/2 for x from 0 to Pi/2, and slope -Pi/2 for x from Pi/2 to Pi. Assume that the boundary conditions are u(0, t) = 0 and u(Pi, t) = 0. Write the MATLAB code using finite difference method .
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
