0

This is the code that failed:

g[x_] := x + a
Manipulate[Plot[g[x], {x, -10, 10}], {a, -10, 10}]

and this is the one that worked:

g[x_, a_] := x + a
Manipulate[Plot[g[x, a], {x, -10, 10}], {a, -10, 10}]

I'm planning on using codes like this to manipulate fit parameters to find good initial guesses for LinearModelFit or NoneLinearModelFit and it seems very excessive to me to have to define all of them as variables every time. Some functions have a lot of them...

MarcoB
  • 67,153
  • 18
  • 91
  • 189

0 Answers0