The hybrid system that I am solving
pfun = ParametricNDSolveValue[{y''[t] == -9.8 bounce[t],
y[0] == height, y'[0] == 0, bounce[0] == 1,
WhenEvent[y[t] == 0,
If[Abs[y'[t]] > 10^-6,
y'[t] -> -0.7 y'[t], {bounce[t], y'[t]} -> {0, 0}]]},
y[t], {t, 0, 4}, {height}, DiscreteVariables -> bounce];
Plot[Evaluate[Table[pfun[height], {height, 1, 5, .2}]], {t, 0, 4},PlotRange -> All]
Then I run the following:
Plot[Evaluate[Table[pfun'[height], {height, 1, 5, .2}]], {t, 0, 4},
PlotRange -> All]
Now I rerun
Plot[Evaluate[Table[pfun[height], {height, 1, 5, .2}]], {t, 0, 4},
PlotRange -> All]
Why are these results different. Please help.