Manipulate is a fantastic feature of Mathematica. However, I face a weird thing. When I intend to plot height[t], and manipulate height[t] with M, the plot does not change! Also how can I put height[t] inside Manipulate part of the code. It is too long in the way below. If I just put height[t], it did not recognise M and g I think. Anyway the manipulation with g manipulation works but with M not.
κ = 1;
b = 0.4;
Γ = 0.2;
h[0] = κ*b*(1 - b);
θ[0] = κ*(1 - 2*b);
h[2] = 1/2*(1/2 - M*g +
8*κ^2*(h[0] + (1 - b)*θ[0])^2*(κ^2 +
3*θ[0]^2)/(3*(κ^2 - θ[0]^2)^3));
height[t_] := h[0] + t^2*h[2];
Manipulate[
Plot[ h[0] +
t^2*(1/2*(1/2 - M*g +
8*κ^2*(h[0] + (1 - b)*θ[0])^2*(κ^2 +
3*θ[0]^2)/(3*(κ^2 - θ[0]^2)^3))), {t,
0, 0.1}, Filling -> filling, PlotRange -> Automatic], {M, 0,
1}, {g, 0,
2}, {filling, {None, 2, 1.5, 1, 0.5,
0, -0.5, -1, -1.5, -2}}, {filling, -2, 2}]
/. {M -> m, g -> G}in the plot function, thenManipulate[]overm, G. Or make sureh[]takesMandG. – Feyre Oct 12 '16 at 08:25