1
$\begingroup$
prod[k_, a_] := a*k^0.5;
depr[k_, d_] := d*k;
Manipulate[
 Column[{
   Plot[prod[k, a], {k, 0, 10}, PlotRange -> {0, 10}],
   Plot[prod[k, a]/k, {k, 0, 10}, PlotRange -> {0, 10}]}],
 {a, 1, 5}]

enter image description here

How do you add the function $depr[k,a]$ in the upper graph? And in the lower graph $depr[k,a]/k$? $d$ should appear with controls to manipulate the value.

I also want to add a function which is a fraction of the $prod[k,a]$-function as $s*prod[k,a]$ with $0<s<1$ in the upper and $s*prod[k,a]/k$ in the lower graph. $s$ should appear with controls to manipulate the value aswell.

$\endgroup$
  • 2
    $\begingroup$ Just list your desired plots in Plot, e.g.: Manipulate[ Column[{Plot[{prod[k, a], depr[k, a], s prod[k, a]}, {k, 0, 10}, PlotRange -> {0, 10}], Plot[{prod[k, a]/k, depr[k, a]/k, s prod[k, a]/k}, {k, 0, 10}, PlotRange -> {0, 10}]}], {a, 1, 5}, {s, 0, 1}] $\endgroup$ – ubpdqn Jun 24 '17 at 11:16
2
$\begingroup$

If I understand you correctly; you don't necessarily want a and s to take the same values in each of the plots. I'm not a big Manipluate user, so there may well be a better way, but the following should get you pretty close:

Column[{Manipulate[
   Plot[{prod[k, a], depr[k, a], s prod[k, a]}, {k, 0, 10}, 
    PlotRange -> {0, 10}], {a, 1, 5}, {s, 0, 1}], 
  Manipulate[
   Plot[{prod[k, a]/k, depr[k, a]/k, s prod[k, a]/k}, {k, 0, 10}, 
    PlotRange -> {0, 10}], {a, 1, 5}, {s, 0, 1}]}]

Basically, make the Manipulates and put them in a Column rather than trying to Manipulate a Column of plots.

enter image description here

$\endgroup$

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.