Updated 06 Dec 2019
A live script that describes how finite difference methods works solving heat equations.
michio (2020). Simple Heat Equation solver (https://www.github.com/mathworks/Simple-Heat-Equation-solver), GitHub. Retrieved .
Thanks for the quick response! I have to solve the exact same heat equation (using the ODE suite), however on the 1D heat equation. So du/dt = alpha * (d^2u/dx^2). I already have working code using forward Euler, but I find it difficult to translate this code to make it solvable using the ODE suite. Your code seems to do it really well, but as i said I need to translate it in 1D. And I do not have to use Neumann boundary conditions. I have as initial values for y=1, t=0, v=1 and for y=0, v=0. Do you have any tips on what I need to adjust?
Thanks, Jim. What kind of issues are you having? Could you be more specific so that I could help?
Note: pdepe function can be of use for 1D purpose.
Very nice code, I want to translate this code into 1D. I do however have some issues with the getRHS code. Do you have any tips on what I should change to make it 1D?
Move to GitHub
Added a screenshot