- Source: moodle
function flow1D()
%
% Draw the flow of a 1D system
%
close all
Define the x and y sets
xmin = -5;
xmax = +5;
x = linspace(xmin, xmax, nPoints);
Evaluate the derivative
dx = -10*x + x.^3;
Draw the flow
hold on
h = quiver(x, 0*x, dx, 0*dx, 'b');
Draw the steady states
plot(x1, 0, 'ro')
plot(x2, 0, 'ro')
plot(x3, 0, 'ro')
%% Additional figure commands
xlim([xmin xmax])
xlabel('x')
ylabel('dx/dt')
end