I have a function F=c+dz, which has particular boundary values, say F(z=1)=2 and F(z=-1)=1, Then I can determine the coefficients: c=1.5 and d=0.5. However, the following does not work!
ClearAll;
F[c_, d_, z_] = c + d*z;
Print[F[c, d, 1]]; Print[F[c, d, -1]];
Solve[{F[c, d, 1] == 2, F[c, d, -1] == 1}, {c, d}];
Print["c=", c, " d=", d];
Where's the mistake?
PS. There's a question of similar title here, which hasn't received an answer (and looks complicated too).

s = Solve[{f[c, d, 1] == 2, f[c, d, -1] == 1}]in the second line (omitting{c,d}part)? Seems that works too. Anyway stillcandddon't take their values (What isPrint[c,d];?). How doessbecome an array? – hbaromega Jan 04 '15 at 16:55Solve[]doesn't return "values" but "replacement rules". Please read the docs and this – Dr. belisarius Jan 05 '15 at 05:14candd, ifSolvecannot return them! Anyway, granting that, could you explain me how it stores in an arrays? Say, what woulds[[2]]mean and when can I use that? – hbaromega Jan 05 '15 at 07:31