I am generating an Array with symbolic coefficients:
coefficients = Array[c, 3]
> {c[1], c[2], c[3]}
I would like to assign a value to each of these generated coefficients, such that in one go, c[1] = 2, c[2] = 4, c[3] = 6. Now the following statement:
coefficients = {2,4,6};
does not do that: it merely changes the array's entries, but doesn't actually assign anything to c[1] ... c[3].
I've been trying to play with Hold and Unevaluated functions to achieve this, but to no avail. Is there a way to do this?
Unevaluated[coefficients = {1, 2, 3}] /. OwnValues[coefficients]Should I delete this question as it's a duplicate? – Jelle Feb 06 '15 at 11:09