Solving heat transfer equation using finite difference method
7 views (last 30 days)
Please, I am trying to solve for the temperature distribution in a box but I am having issues with my code error: "Index exceeds matrix dimension". This is my code
Tc = 25;
c= 0.334 +(0.00977*M);
Benjamin Großmann on 23 Apr 2018
You start with i=1 and one of your indices is T(i-1), so this is addressing the 0-element of T. In Matlab we start with index 1. This could be one problem but it is not possible to debug your code as it is since there are "end"s missing and the function or Matrix "F" is not given.