EXERCISE 8.
1
CS10-8
Name: Gonzaga, Vinz Scott P. Section: A1
Graph the following using contour3 (1) and waterfall (2). Write the detailed syntax/functions
used. Use appropriate domain .
(Copy/paste or screened shot the graph/output)
1. y = 4cos3x
2. y = sinx +1
Code used:
[x, ~] =meshgrid(linspace(-10,10,200));
a=4*cos(3*x);
contour3(a)
title ('Part a contour3')
figure
waterfall(a)
title ('Part a waterfall')
b=sin(x)+1;
figure
contour3(b)
title ('Part b contour3')
figure
waterfall(b)
title ('Part b waterfall')