TransWikia.com

Manipulate works in Mathematica but not in Wolfram Player

Mathematica Asked by Corvus on February 23, 2021

This is most likely a very naive question, but I’m puzzled as to why the following code runs smoothly in Mathematica 12.1.1.0 but does not generate a working plot in Wolfram Player 12.1.1.0.

f[a_, x_] := Sin[a x];
Manipulate[ 
 Plot[f[a, x], {x, 0, 20}],
 {{a, 1}, 0, 3}
 ]

In Mathematica, I get the expected interactive Sin graph. In Wolfram Player, I get the axes and the slider, but no graph.

If I replace the separate function definition with

Manipulate[Plot[Sin[a x]....

everything works fine in Wolfram Player.

I must not understand what Wolfram Player is supposed to do, but I’ve struggled to find adequate documentation.

Thank you in advance.

One Answer

This isn't working likely because the function in wolfram player hasn't been initiated yet. If you turn that cell into an initialization cell and reexport to cdf it should work fine, you can do this by highlighting the cell right clicking the bar/bracket thing on the right side and setting it to Initialization, this should fix the issue.

I unfortunately couldn't replicate the problem on my machine, so this is mostly just conjecture and knowledge that Plot[] produces blank graphics when variables or functions are missing or are not numeric.

Answered by morbo on February 23, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP