%% YOURNAME (DUEDATE)
%
% *IMPORTANT:*
%
% Do not change *anything* in this header (besides your
% name and due date above as needed)!
%
% Put your solution to the exercise completely at the end
% of this file.
%
%%
% <latex>
% % for Octave, or for Matlab published to LaTeX for proclatex
% \input{../setup.tex}
% </latex>
%
%% FOR, IF, WHILE, Exercise 2

if ~exist('___code___','var') ; clear ; end
format compact
more off


%% EXERCISE DESCRIPTION:
%
% Compute and plot power line sag.  This is a modified
% version of an earlier script.  Unlike the earlier
% script, this version should allow any number of points
% |n| to be used along the half power line by simply
% changing the value of variable |n|.
%
% The equations to solve are:
%
%                h(1)        == H
%       h(1) - 2 h(2) + h(3) == rho/(n-1)^2
%       h(2) - 2 h(3) + h(4) == rho/(n-1)^2
%       h(3) - 2 h(4) + h(5) == rho/(n-1)^2
%                ...         == rho/(n-1)^2
%   2 h(n-1) - 2 h(n)        == rho/(n-1)^2
%
% where |H| and |rho| are 1.  This is the same as the
% previous exercise when |n| = 6.
%
%% Hints
%
% * The correct solution to the original exercise should
% already be posted.  Just modify it so that it works
% correctly for any value of |n|
%
% * After you have created this script, first run it with
% |n| equal to 6 and make sure you get the earlier,
% posted, results.  Then set |n| equal to 11 and examine
% matrix |Mat| and right-hand side vector |rhv|, to see
% whether all seems sound.  Then check that you get a
% similar but better looking plot than before.


%% SOLUTION:


