function param_sweep
h     = 0.1;
Nmx   = 40;
mu0   = -1;
[t z] = ode45(@(t,x) func(x,mu0), [0 5], 0);                  %#ok<ASGLU>
x0    = z(end);

xs  = x0;
mus = mu0;

for i=2:Nmx
  mu0   = mu0 + h;
  [t z] = ode45(@(t,x) func(x,mu0), [0 1], x0);               %#ok<ASGLU>
  x0    = z(end);
  xs    = [xs x0];                                            %#ok<AGROW>
  mus   = [mus mu0];                                          %#ok<AGROW>
end

plot(mus, xs)
end

function y = func(x,mu)
y = (mu+x-x^3)*( (x-2)^2 - mu+2 );
end
