Re: replace integration by summation [message #84959 is a reply to message #84953] |
Wed, 19 June 2013 14:20   |
Paul Van Delst[1]
Messages: 1157 Registered: April 2002
|
Senior Member |
|
|
D'oh... mistakenly hit reply instead of followup. Sorry. Stoopid tbird.
On 06/19/13 16:05, fd_luni@mail.com wrote:
>> But when you took Mats's suggestion and computed
>> INT_TABULATED(t,A1), was the single value zero or not?
>
> No it was not a single value zero.
>
> I had two function like this: For i=1,n-1 do begin A2=
> INT_TABULATED(t[0:i], A1[0:i]) B2= INT_TABULATED(t[0:i], B1[0:i])
> endfor
>
> When I replaced the INT_TABULATED by this: A2 =
> (t[1]-t[0])*total(A1,/cumulative) B2 =
> (t[1]-t[0])*total(B1,/cumulative)
>
> The function A2 = (t[1]-t[0])*total(A1,/cumulative) gives me
> completely different values from A2= INT_TABULATED(t[0:i], A1[0:i]).
That's fair enough. They should be different (how much depends on the
data - see Phillip Bitzer's nice example.)
> But the function B2 = (t[1]-t[0])*total(B1,/cumulative gives me
> zeros.
Well, I would posit that either
a) t[1] = t[0]?
b) B1 is full of zeroes?
cheers,
paulv
|
|
|