I have an array of functions in terms of a[0] through a[n] and I wish to replace the a[]'s with previously calculated values p[0] through p[n], as in below:
p = Table[Chop[NIntegrate[f[t]*wt[t]*Tn[t], {t, 0, 1}]/(Pi/2)], {n, 0, k}];
p[[1]] = p[[1]]/2;
s = Table[Coefficient[pmult[j], tstar[i], 1], {j, 0, k}, {i, 1, k}]
q3=s/.p
What is the best way of doing this? I have tried the Replace[], ReplaceAll[], and /. commands but none seem to be giving me what I want. I just want a[0] replaced with the number contained in p[0], a[1] replaced with p[1], etc.
Thanks in advance!
q3 = s / a :> p
$\endgroup$