cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

Please Help! This can't be that complicated

BrianAndreola
1-Newbie

Please Help! This can't be that complicated

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!

1 REPLY 1
PhilipOakley
5-Regular Member
(To:BrianAndreola)

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

Top Tags