- Define Parameters and Set Initial Conditions: Set up the slab length, time steps, and boundary conditions, same as in the explicit method.
- Construct the Coefficient Matrix (A): Build a tridiagonal matrix based on lambda values, which will serve as the system's coefficient matrix for the implicit approach.
- Set Up the Right-Hand Side Vector (b) at Each Time Step: Use the temperature values from the previous time step to set up the vector b, incorporating boundary conditions.
- Solve the System and Update Temperatures: Solve the matrix equation '' to get the temperature distribution, updating the results for each time step.
- For more details, refer to the following MathWorks documentation on 'mldivide' https://www.mathworks.com/help/matlab/ref/double.mldivide.html