Contents
Aaron Klapheck
clear, clc
Date = date
Date =
12-Dec-2007
Problem 33
Time = [0:1:6];
Temp = [300, 150, 75, 35, 12, 5, 2];
p = polyfit(Time, log10(Temp), 1);
m = p(1);
b = 10.^p(2);
x_2 = [0:0.01:6];
f_of_x = b.*(10).^(m.*x_2);
plot(Time, Temp, 'o', x_2, f_of_x), xlabel('Time (seconds)'), ...
title('The Cooling of a Sphere Over Time'), ...
ylabel('Temperature (degrees C)'), ...
legend('Data', 'Approximating Function')
Problem 49
a = 1;
t = [0:0.1:10*pi];
Problem 49 - Part a (b = 0.1)
b = 0.1;
x = a*cos(t);
y = a*sin(t);
z = b*t;
plot3(x, y, z), xlabel('x'), ylabel('y'), zlabel('z'), ...
title('Helix when b = 0.1'), grid
Problem 49 - Part b (b = 0.2)
b = 0.2;
x = a*cos(t);
y = a*sin(t);
z = b*t;
plot3(x, y, z), xlabel('x'), ylabel('y'), zlabel('z'), ...
title('Helix when b = 0.2'), grid
Problem 49 - Part c (b = -0.1)
b = -0.1;
x = a*cos(t);
y = a*sin(t);
z = b*t;
plot3(x, y, z), xlabel('x'), ylabel('y'), zlabel('z'), ...
title('Helix when b = -0.1'), grid
Problem 50
t = [0:0.0001:0.2];
x = (0.5 + 5.*t).*sin((2*pi/3).*t).*cos(4*pi.*t);
y = (0.5 + 5.*t).*sin((2*pi/3).*t).*sin(4*pi.*t);
z = (0.5 + 5.*t).*sin((2*pi/3).*t);
plot3(x, y, z), xlabel('x-coordinate'), ylabel('y-coordinate'), ...
zlabel('z-coordinate'), title('Movement of a Robot Hand'), grid
Problem 52 - Mesh plot
[x, y] = meshgrid(-10:0.1:10);
z = -x.^2 + 2.*x.*y + 3.*y.^2;
meshz(x, y, z), xlabel('x'), ylabel('y'), zlabel('z'), ...
title('Meshz Plot')
Problem 52 - Surface plot
surf(x, y, z), xlabel('x'), ylabel('y'), zlabel('z'), ...
title('Surface Plot')
Problem 52 - Contour plot
contour(x, y, z), xlabel('x'), ylabel('y'), zlabel('z'), ...
title('Countour Plot'), grid