%Brad Nelson
%M126 HW5 #1c
%2/8/12

m=30; %number of nodes

[z,dzdx,n]=param(m); %parameterizes equation

figure;
hold on;
plot([z(1,:),z(1,1)],[z(2,:),z(2,1)],'.-');
%quiver(z(1,:),z(2,:),n(1,:),n(2,:),'-'); %makes arrows, not lines
%following for loop puts lines of length 0.5 at zs in n direction
for i=1:numel(z(1,:))
line([z(1,i) z(1,i)+0.1*n(1,i)],[z(2,i) z(2,i)+0.1*n(2,i)]);
end
axis equal;
xlabel('x_1');
ylabel('x_2');

print -depsc 1c.eps;