Re: [Tutor] Loops and matrices'

2011-08-29 Thread Peter Otten
Reed DA (Danny) at Aera wrote: > I have a matrix which contains temperatures. The columns are time, spaced > 33 seconds apart, and the rows are depth intervals. What I'm trying to do > is create another matrix that contains the rate of change of temperature > for each depth. The array is called LS

Re: [Tutor] Loops and matrices'

2011-08-29 Thread Steven D'Aprano
Alan Gauld wrote: On 30/08/11 00:26, Emile van Sebille wrote: delta_temp(i,j) = (LS_JULY_11(i,j) - LS_JULY_11(i,j-1))/TIME_STEP delta_temp access and assignment likely wants to be expressed with brackets rather than parens. And for those not speaking the US variant of English that'll be squ

Re: [Tutor] Loops and matrices'

2011-08-29 Thread Alan Gauld
On 30/08/11 00:26, Emile van Sebille wrote: delta_temp(i,j) = (LS_JULY_11(i,j) - LS_JULY_11(i,j-1))/TIME_STEP delta_temp access and assignment likely wants to be expressed with brackets rather than parens. And for those not speaking the US variant of English that'll be square brackets as op

Re: [Tutor] Loops and matrices'

2011-08-29 Thread Emile van Sebille
On 8/29/2011 3:28 PM Reed DA (Danny) at Aera said... Hi all, I have a matrix which contains temperatures. The columns are time, spaced 33 seconds apart, and the rows are depth intervals. What I'm trying to do is create another matrix that contains the rate of change of temperature for each depth

Re: [Tutor] Loops and matrices'

2011-08-29 Thread Prasad, Ramit
Hi Danny, Most likely you want     delta_temp(i,j) = (LS_JULY_11(i,j) - LS_JULY_11(i,j-1))/TIME_STEP to become (changed the character from '()' to '[]':     delta_temp[i,j] = (LS_JULY_11(i,j) - LS_JULY_11(i,j-1))/TIME_STEP Basically it t

[Tutor] Loops and matrices'

2011-08-29 Thread Reed DA (Danny) at Aera
Hi all, I have a matrix which contains temperatures. The columns are time, spaced 33 seconds apart, and the rows are depth intervals. What I'm trying to do is create another matrix that contains the rate of change of temperature for each depth. The array is called LS_JULY_11 and the output arra