I am trying to CloudDeploy a Manipulate with codes of multiple linesin Programming Lab. Taking a simple sin curve as below. If I simply use CloudDeploy[Manipulate[Plot[Sin[n*x], {x, 0, 6}], {n, 1, 10}]] , there is no problem and I can deploy the manipulate successfully. But I need something more complicated and I starts to split the code into 2 lines as below, and the deploy is a manipulate with button but the curve disappeared. How can I deploy the manipulate? Many thanks!
My current code:-
CloudDeploy[(
f[n_, x_] = Sin[n*x];
Manipulate[Plot[f[n, x], {x, 0, 6}], {n, 1, 10}]
)]
SaveDefinitionsasCloudDeploydoes not parseManipulatewhen collecting dependencies. p.s. let me know if you disagree with closing. – Kuba Apr 18 '18 at 06:18f[n_, x_] = Sin[n*x]; CloudDeploy[(Manipulate[Plot[f[n, x], {x, 0, 6}], {n, 1, 10},SaveDefinitions -> True ])]– H42 Apr 18 '18 at 06:24