Having trouble plotting. Here is my code:

Nothing is plotting when I try to run the code

=================

  

 

Your function is defined improperly (use L[A_]:=) and the Plot needs to be inside the Manipulate.
– bill s
May 12 at 22:42

  

 

Your range for {K, .5, .5, .5} looks wrong
– Jagra
May 12 at 23:03

  

 

You should comp and paste the code in next time.
– jackskis
May 13 at 2:33

=================

2 Answers
2

=================

Manipulate[
Plot[F*(1 – Exp[-K (A – S)]), {A, 0, 100}, PlotRange -> {0, 50}], {S,
1, 5, 1}, {F, 40, 50, 1}, {K, .5, .5, .5}]

$Version

(* “10.4.1 for Mac OS X x86 (64-bit) (April 11, 2016)” *)

For a control with a small number of discrete values, a ControlType of either SetterBar or PopupMenu may be a better choice than a Slider. The following enables selection of each control type for comparison. The controls do not need to be all of the same type. You can mix and match to taste.

Manipulate[
Manipulate[
Plot[
F*(1 – Exp[-K (A – S)]),
{A, 0, 100},
PlotRange -> pltRng],
{{S, 3}, 1, 5, 1, ControlType -> controlS,
If[controlS === Slider, Appearance -> “Labeled”, Nothing]},
{{F, 45}, 40, 50, 1, ControlType -> controlF,
If[controlF === Slider, Appearance -> “Labeled”, Nothing]},
{{K, 0.5}, 0, 1, .25, ControlType -> controlK,
If[controlK === Slider, Appearance -> “Labeled”, Nothing]}],
Row[{
Control[{{controlS, SetterBar, “S”},
{SetterBar, PopupMenu, Slider}, ControlType -> PopupMenu}],
Spacer[20],
Control[{{controlF, PopupMenu, “F”},
{SetterBar, PopupMenu, Slider}, ControlType -> PopupMenu}],
Spacer[20],
Control[{{controlK, SetterBar, “K”},
{SetterBar, PopupMenu, Slider}, ControlType -> PopupMenu}]}],
Delimiter,
{{pltRng, {0, 50}, “Plot Range”}, {{0, 50}, Automatic, Full}}]