In the program "make P & T" "n" is the number of iterations and "nr" means that only every nr-th calculated value is added to the return vectors.
When I call that function I use the worksheet variable N (120000) for iteration number and worksheet n (300) gets nr in the program. I thought that 400 points are enough, so I set n to 300 (=120000/400).
When I think about it - it would make more sense if the last parameter nr would mean the number of points (at least approx.) which are returned. To make this work you could add "nr <-- floor(n/nr)" somewhere in the front before the for-loop.
Is there a way to display w_dot(P,T) at any of the given time steps? I'd like to see what is going on in the calculation for w_dot during each time increment. There should be a 5x5 matrix called w_dot during each time increment and I would like to display certain ones.
First it seems that you have a superfluous line in your program because w is not used in you calculations at all.
As for the wdot values. You should be able to calculate and display them after the routine has run and you would not have to change anything in the program. The programm returns all Pressure and temperature values, so you could select the step of interest (a specific column in the resulting matrices) and feed them in wdot().
I can't try as the sheet does not work without the extern excel table, but something like the following should work:
You are right, the P- and T-values for each step are the rows, not the columns as I wrote. So we have to use the row selector and then transpose to get a columnvector.