% M21-126 Intro to Math Software
% Spring 2000
% Dr. David Handron

% homework5.m

echo on

% QUESTION 1

% Matlab's plot() command will plot arrays of x and y variables
% As an example,

X = [0,0.25,0.5,0.75,1]
Y = [1/4,1/16,0,1/16,1/4]

plot(X,Y)

pause

% Use the help file to find out how to plot two curves on the same set
% of axes, and plot sin(x) and cos(x) over the interval (0, 2pi)
pause

% QUESTION 2

% If the matrix values represent z coordinates on a rectangular mesh,
% the mesh command will plot the surface. As an example,

A = eye(4)
mesh(A)

% Use mesh() to plot the function sin(x)*sin(y) for 0<x<pi and 0<y<pi




