Professional Documents
Culture Documents
ENS101 F22 Tut10
ENS101 F22 Tut10
Engineers use large amount of graphical representations, this is a deeper look in to graphics of tools.
In this Octave laboratory we will examine the graphical capabilities of the tools in hand.
Your homework is to run and analyze the following codes and report on the results. The first few examples are for you
to understand and apply the code, then you are asked to run for the remaining functions
2D plots
Name Parameter values Equations Code to generate the graph
Cycloid phi = linspace(-pi, 3*pi, 200);
ra = [0.5, 1, 1.5];
for k = 1:length(ra)
subplot(3,1,k)
plot(ra(k)*phi-sin(phi), ra(k)-cos(phi))
axis equal
title(['r_a = ' num2str(ra(k))])
axis equal off
end
Concho-spiral a = 1; b = 1.05; c = 3;
u = linspace(0, 12*pi, 200);
bu = b.^u;
plot3(a*bu.*cos(u),
a*bu.*sin(u), c*bu, 'k-')
axis equal