Lung Model DTDS.  (Subscript[c, t+1]) = (1-q) (Subscript[c, t ])+qγ

Manipulate["(Subscript[c, t + 1]) = (1- q) (Subscript[c, t]) + qγ "
Column[{
Grid[{{"t",0,1,2,3,4,5,6,7},Join[{Subscript["x","t"]},NestList[(1-q) # +q γ &,x0,7]]},Frame->All],
Row[{
ListPlot[
      If[ drugi,
     {NestList[(1-q) # +q γ&,x0,maxT],
     NestList[(1-q) # +q γ&,If[x0+roz<0,0,If[x0+roz>1,1,x0+roz],x0+roz],maxT]},
       NestList[(1-q) # +q γ&,x0,maxT]] ,
      PlotRange->{0,1},
      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["c","t"],Large,Bold,Blue]}
  ],
Show[Plot[{(1-q) x +q γ,Nest[(1-q) # +q γ&, 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-q) # +q γ}}],
Line[{{#, (1-q) # +q γ},{(1-q) # +q γ, (1-q) # +q γ}}]}  & ,NestWhileList[(1-q) # +q γ&, x0, #1 ≠ (1-q) #2 +q γ &, 2, n]]]],ImageSize->{500,400},ImagePadding->{{20,10},{30,20}}
]}]
},Alignment->Center],
{{q,0.4,"parameter q"},0,2,0.1, Appearance->"Labeled"},
{{γ,0.5,"parameter γ"},0,4,0.1, Appearance->"Labeled"},
{{x0,1,"initial value (Subscript[c, 0])"},0,1,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)