MATLAB Answers

0

How to solve a 2D PDE with backward Euler?

Asked by Danny Helwegen on 13 Jan 2019
Latest activity Edited by M
on 14 Jan 2019
Accepted Answer by M
Hi, i have to solve the 2D heat equation:
∂T/∂t = α∇^2 T = α(∂^2T/∂x^2 + ∂^2T/∂y^2)
It is given that at the 4 boundaries the T is 0. I've already written some code, but it doesn't works. Can someone review my code and help me? The error occurs at the end, when the new T are put in a matrix. The code has been added as an attachment.

  0 Comments

Sign in to comment.

1 Answer

Answer by M
on 14 Jan 2019
Edited by M
on 14 Jan 2019
 Accepted Answer

At line 58, you are trying to access the 11th element of the Number matrix, but its dimensions are 10 x 10, so you get an error.

  0 Comments

Sign in to comment.