n = 21;
x = linspace ( 0.0, 1.0, n );
ym = zeros ( n, 1 );
y0 = 0.5 * ones ( n, 1 );
y1 = x;
y2 = sin ( 3.0 * pi * x );
clf ( );
hold ( 'on' );
plot ( x, ym, 'ko-', 'linewidth', 2 );
plot ( x, y0, 'go-', 'linewidth', 2 );
plot ( x, y1, 'bo-', 'linewidth', 2 );
plot ( x, y2, 'ro-', 'linewidth', 2 );
hold ( 'off' );
grid ( 'on' );
print ( '-dpng', 'physics.png' );

