1
$\begingroup$

I have a little problem using the Manipulate command.

I am trying to write down the parameter control of a function that is entered into this command not explicitly. But in this case, the variable parameter "does not cling" to the function and the command does not work.

I will show what I mean.

In this case, the command works successfully.

Manipulate[Plot[Sin[2*(x + x^Sin[1*a])], {x, 0, 30}], {a, 0, 10}]

enter image description here

In this case, nothing happens.

f = Sin[2*(x + x^Sin[1*a])]

Manipulate[Plot[f, {x, 0, 30}], {a, 0, 10}]

enter image description here

At the same time, RegionPlot3D, SurfacePlot3D, etc. successfully work as I need.

What am I doing wrong?

$\endgroup$
1
  • $\begingroup$ It seems I found a solution: Append multiple plots with Manipulate I mean, we need "constructions" like this. I'm right? That is, write the parameters to the function name in square brackets. Fx [b_, c_, y_, x_]: = Sin [x / c] + Cos [b y] $\endgroup$
    – dtn
    Apr 14 '20 at 14:25
1
$\begingroup$

Try this:

Clear[f];
f[x_, a_] := Sin[2*(x + x^Sin[1*a])]

Manipulate[Plot[f[x, a], {x, 0, 30}], {a, 0, 10}]

Have fun!

$\endgroup$
1
  • $\begingroup$ Yes it works. Thank you! $\endgroup$
    – dtn
    Apr 14 '20 at 14:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.