anonymous
2010-11-11 19:08:53 UTC
Basically, what the program is doing is reading data points from a textfile (you also have to name a textfile for it to create and then it prints a header in there-- but that part isn't so important). From the data, it produces a table and then proceeds to fill the table with all those temperatures. The "cell" where the probe is applied however has a different temperature that is supposed to remain constant as the program continues to update.
To update, each cell averages 5 values... its own value, and the four adjacent cells. If a cell is a side or an edge, the cell substitutes ambient temperature as one or two of the 5 values used in the averaging.
here is the program, the problem lies within the update plate void function, im 100% sure.
http://pastebin.com/JB4Uimts
So from the initial plate to plate 1, the program works fine. All the values match the correct output.
HOWEVER
When the update plate function reiterates, this is when I start to get incorrect numbers.
I don't understand why this would be the case. The values are not far off, but they aren't right
Here is what the 2nd table after initial plate should look like:
http://pastebin.com/g7g6fbJw
However, if you run the program with a textfile with the given input, it will not resemble this.... strange...
First person to find out where the problem is gets 10 points!
THANKS!
If you'd like me to post more information, by all means, ask away. I'm asking this question because I can't see how to fix this problem and it's literally driving me crazy