%%% Purpose: his function plots different functions of the form f(x,y) = z
%%% for Catalyst 2015
%%% Date: August 2015
%%% Written by: Alexandria Volkening
function [] = plotCatalyst()
%%% First we define our variables x and y. This portion of the code does
%%% not need to be altered.
x = -10:.1:10;
y = -10:.1:10;
[x,y] = meshgrid(x,y);
%%% Here we specify what z = f(x,y) is. Feel free to try different
%%% functions. Remember that in Matlab you need to always include a
%%% period before ^ (exponent), * (multiplication), or / (division). We
%%% have included some example functions for you to try as well - to plot
%%% one, remove the % in front of the example you want to plot and place
%%% and % back in front of any of the examples you are not currently
%%% plotting.
%z = -x.^2 -y.^2; %%% Example 1
%z = x.^2; %%% Example 2
%z = y.^2; %%% Example 3
%z = 2.*x; %%% Example 4
%z = y + 5; %%% Example 5
%z = x.^3; %%% Example 6
z = 3.*x.^4 + y.^2; %%% Example 7
%%% This portion of the code plots z as a function of x and y and does not
%%% need to be altered.
figure
contour(x, y, z, 'k')
hold on
mesh(x, y, z)
title('Plot of f(x,y) = z')
xlabel('x')
ylabel('y')
zlabel('z')
contour(x, y, z, 'k')
hold off
figure
contour(x, y, z)
hold on
title('Contours (level curves) of f(x,y) = z')
xlabel('x')
ylabel('y')
%axis equal
hold off