following this question of mine Conditional PlotStyle, I ran into another problem.
I fear it has to do with evaluation orders, as for example described in Table and Evaluation Order, but I am totally unable to understand the subtlety.
Even recreating a minimum working example proved trickie. The following is sufficient to trigger a problem (although not exactly the same I witness, I hope the roots are the same).
A function is defined
f2[x_, y_] := x^2 - y
and another two, the first using using FindMinimum
g[y_] := FindMinimum[f2[x, y], x]
f3[z_, n_] := g[z/n][[1]]
Now if I use
Plot[Table[f3[z, n], {n, 1, 10}], {z, 0, 0.3}]
everything runs fine.
Yet, if I do
Plot[Evaluate@Table[f3[z, n], {n, 1, 10}], {z, 0, 0.3}]
I get minimisation errors. In my original case I do get a plot, albeit a wrong one, compared to the correct results I get before using Evaluate
.
Thanks