I need to define a list of parameters A[i] where i runs from 1 to some integerN. The expression for A[i] is given by some other indexed object a[i]. E.g.

`A[i] =  a[i]/(10 + a[i]^2)`

where a[i] are some free parameters and I want to compute, say,

`Product[A[i]^2 + i^4,{i,1,N+2}]`
  • $\begingroup$ try A[i_] = a[i]/(10 + a[i]^2) ? $\endgroup$ – george2079 Apr 11 '18 at 13:27
  • $\begingroup$ if "i runs from 1 to some integer N" but Product[A[i]^2 + i^4,{i,1,N+2}] you are going to have a problem; try something like With[{n = 10}, Array[(a[#] = RandomReal[]) &, n]; A[i_] = a[i]/(10 + a[i]^2); Product[A[i]^2 + i^4, {i, 1, n}] ]; also this might be relevant too. $\endgroup$ – user42582 Apr 11 '18 at 13:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.