Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X
I've been staring at this MathCAD file for hours now, and can't figure out why I'm getting the error that I am. It's just a simple algorithm, and shouldn't be that complicated. If anyone can just take a look at it, and see if you can find something wrong that I can....I'd appreciate it. The file is attached.
Thanks in advance everyone!
Right click on the error and use the top option of "Trace Error" to step back through the routines to the source.
What I found was that your initialisation is 'off by one' (or unitialised).
In TempAtTimeStep you use Temp[n,m at the fisrt pass of n=1 when you have only assigned (passed in) the first column.
You need to create / assign that missing column, or sort out the indexing if you are off by one.
You are also likely to have forgotten that Mathcad counts from zero, rather than one, so you will have spare blank zeroth columns in all your matrices, further exacerbating the debugging difficulty. If you truly want to use one based counting, set ORIGIN:=1 at the top of the sheet, or at least add ORIGIN= so that we can see its value
Philip