0
$\begingroup$

If the following works for me,

Block[{a = 0.35, b = 0.25}, Plot[PDF[\[ScriptCapitalD]A, x], {x, 0, 1}, PlotRange -> {{0, 1}, {0, 50}}, Filling -> Axis]]

then why won't this manipulate work:

Manipulate[Plot[PDF[\[ScriptCapitalD]A, x], {x, 0, 1}, PlotRange -> {{0, 1}, {0, 50}}, Filling -> Axis], {{a, 1/2}, 0, 1}, {{b, 1/2}, 0, 1}]
$\endgroup$
3
  • 1
    $\begingroup$ Make your plotting function a function of a and b $\endgroup$
    – Lotus
    Sep 10, 2018 at 13:04
  • $\begingroup$ I am quite new to Mathematica. @Lotus, could you demonstrate, please? $\endgroup$
    – user120911
    Sep 10, 2018 at 13:05
  • $\begingroup$ How is [ScriptCapitalD]A defined ? Give me its definition. $\endgroup$
    – Lotus
    Sep 10, 2018 at 13:15

1 Answer 1

2
$\begingroup$

Not an answer because the question is incomplete. Here is an example though:

If you are plotting a GammaDistribution with two parameters we can define

\[ScriptCapitalD]A[a_, b_] := GammaDistribution[a, b];

Now:

Block[{a = 0.35, b = 0.25}, 
 Plot[PDF[\[ScriptCapitalD]A[a, b], x], {x, 0, 1}, 
  PlotRange -> {{0, 1}, {0, 50}}, Filling -> Axis]]

Manipulate[
 Plot[PDF[\[ScriptCapitalD]A[a, b], x], {x, 0, 1}, 
  PlotRange -> {{0, 1}, {0, 50}}, Filling -> Axis], {{a, 1/2}, 0, 
  1}, {{b, 1/2}, 0, 1}]
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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