Medicine DTDS.  (Subscript[M, t+1]) = (1-α) (Subscript[M, t ])+g

Manipulate["(Subscript[M, t + 1]) = (1- α) (Subscript[M, t]) +g "
Column[{
Grid[{{"t",0,1,2,3,4,5,6,7},Join[{Subscript["M","t"]},NestList[(1-α) # +g &,x0,7]]},Frame->All],
Row[{
ListPlot[
      If[ drugi,
     {NestList[(1-α) # +g&,x0,maxT],
     NestList[(1-α) # +g&,If[x0+roz<0,0,If[x0+roz>1,1,x0+roz],x0+roz],maxT]},
       NestList[(1-α) # +g&,x0,maxT]] ,
      PlotRange->{0,3},
      PlotStyle->{Directive[RGBColor[.6,.73,.36], PointSize[0.013]] ,If[drugi,RGBColor[1,.47,0], RGBColor[.6,.73,.36]]},
     DataRange->{0,maxT},
     ImageSize->{600,350},ImagePadding->30,AxesLabel -> {Style[t,Large,Bold,Blue],Style[Subscript["M","t"],Large,Bold,Blue]}
  ],
Show[Plot[{(1-α) x +g,Nest[(1-α) # +g&, x,k],x}, {x,0,2}, PlotStyle -> {Gray,Blue},Frame->True,PlotRange-> {{0,2},{0,2}},AspectRatio -> 1],Graphics[Flatten[MapIndexed[{Hue[#2[[1]] / n],Line[{{#,If[#==x0,0,#]},{#,(1-α) # +g}}],
Line[{{#, (1-α) # +g},{(1-α) # +g, (1-α) # +g}}]}  & ,NestWhileList[(1-α) # +g&, x0, #1 ≠ (1-α) #2 +g &, 2, n]]]],ImageSize->{500,400},ImagePadding->{{20,10},{30,20}}
]}]
},Alignment->Center],
{{α,0.6,"parameter α"},0,2,0.1, Appearance->"Labeled"},
{{g,0.6,"parameter g"},0,4,0.1, Appearance->"Labeled"},
{{x0,0.75,"initial value (Subscript[M, 0])"},0,2,0.01, Appearance->"Labeled"},
{{maxT, 50, "end time"}, 10, 100, 1, Appearance->"Labeled"},
{{drugi, False, "second solution?"}, {True, False}},
{{roz, 0, "difference h between initial values"}, -x0, 1-x0, 0.01, Appearance->"Labeled"},
{{n,100, "number of cobweb iterations"},1,200,1, Appearance -> "Labeled"},
{{k,1,"order of iterate in cobweb diagram"},{1,2,3,4,5,6}, ControlType -> Setter}
]

BASED ON THE NOTEBOOK:

"Discrete Logistic Equation" from The Wolfram Demonstrations Project
 http://demonstrations.wolfram.com/DiscreteLogisticEquation/

Contributed by: Marek Bodnar

After work by: Phil Ramsden

Adapted by: Christopher Strickland (CSU 2010)