View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron George Ron George is offline
external usenet poster
 
Posts: 7
Default Code for sigma of product involving exponential - help

Hi Claus,

Thanks a lot. I put the "C2-1" bit there make it understand that the upper limit of sigma function is n-1 where n is the day on any row. If n = 3, C2-1 = 1.

Also, do you think my formula as a whole is correct?

If I manually attempt the calculation by setting k1 = 1 and tau1 = 1 and w(1) through w(4) as 20, 30, 40 & 50 respectively, f(n) comes out very different for the first 4 terms (manual calculation vs formula generated). Please see below :

Manual Calculation for f(n) :
7.35758882
13.74308889
19.77097751
25.66730821

Formula Generated f(n) :
7.35758823
15.09644173
22.12007171
28.56587158

Does the formula have to be pasted in E2 or beginning in E3?


Thanks!

Ron

On Wednesday, April 25, 2018 at 10:24:42 PM UTC+4, Claus Busch wrote:
Hi Ron,

Am Wed, 25 Apr 2018 09:58:09 -0700 (PDT) schrieb Ron George:

f(n) = k1 x Sigma [w(i) x exp(-n-i)/tau1] where i goes from 1 to n-1.


your formula:
=$B$4*SUMPRODUCT(D2*EXP(-1*(ROW(INDIRECT($A$2&":"&C2-1)))/$B$3))
^^^^^^

C2 = 1 and C2-1 = 0
That causes the error.
Try:
=$B$4*SUMPRODUCT(D2*EXP(-1*(ROW(INDIRECT($A$2&":"&C2)))/$B$3))


Regards
Claus B.
--
Windows10
Office 2016