Question: Help on: Error, bad index into Vector

Hello, I am trying to evaluate this summation, but it keeps giving me a "Error, (in H) bad index into Vector", I can`t find the problem in function, would somebody helps? thanks.

My function:

with(linalg); H := proc (z, aa, AA, bb, BB, m, n, p, q) mu0 := sum('BB'[i], i = 1 .. q)-(sum('AA'[i], i = 1 .. p)); beta0 := (product('AA'[i]^(-'AA'[i]), i = 1 .. p))*(product('BB'[i]^(-'BB'[i]), i = 1 .. q)); if z <> 0 and 0 < mu0 or 0 < abs(z) and abs(z) < 1/beta0 and mu0 = 0 then do s := Vector([seq(-('bb'[i]-v)/'BB'[i], i = 1 .. m)]); Hz := sum(sum((product(('`if`')(i <> h, GAMMA('bb'[i]+'BB'[i]*'s[h]'), 1), i = 1 .. m))*(product(('`if`')(i <> h, GAMMA(1-'aa'[i]-'AA'[i]*'s[h]'), 1), i = 1 .. n))*(-1)^v*z^(('bb[h]'+v)/'BB[h]')/(('`if`')(m < q, product(('`if`')(i <> h, GAMMA(1-'bb'[i]-'BB'[i]*'s[h]'), 1), i = m+1 .. q), 1)*`if`(n < p, product(('`if`')(i <> h, GAMMA('aa'[i]+'AA'[i]*'s[h]'), i = n+1 .. p), 1), 1)*factorial(v)*'BB[h]'), h = 1 .. m), v = 0 .. 10) end do end if; return Hz end proc

>evalf(H(.547, Vector([-23-j]), Vector([.5]), Vector([0, -24-j]), Vector([1, .5]), 1, 1, 1, 2))

Please Wait...