% This is a "frame" for your code for step 4 of Project 2.
% **********************
% Please read Appendix B at the end of Project 2 and follow its directions.
% Keep referring to Appendix B as you are working on diferent steps of this code.
% **********************

% Define the parameters given in the problem:
L = 100;  % length of x-interval, ft
H =       % height of the pole, ft
T =       % tension of the cable, lb
% NOTE:  *****  Please avoid hardcoding ! *****
%       Define constants at the beginning of the code before using them later. 

% Define the step size  h  and the grid of numerical points:
N =       % number of subintervals
          % ******************
          % When you write your code, examine your matrix for a small N.
          % Probably, N=5 is the best logical choice, since you know
          % what the matrix should look like from step 3.
          % However, you may experiment with other small values of N, too.
          % ******************
h = L/<'here is some number related to N'>  % step size, ft
x = <'define a vector of x-points in your interval from x=0 to x=L'>
    % Note 1: An efficient way to create a vector with evenly spaced entries
    %         is shown in several places at the bottom half of p. 8 (Secs. 10 and 11)
    %         of H. Sigmon's Matlab Primer. (On the contrary, the way shown at the
    %         bottom half of p. 4 there is quite inefficient.)
    %         Another possible way to define a vector is with a for-loop,
    %         assigning values to x(i), similarly to how this is done for matrices on p. 5.)
    % Note 2: See the last bullet in Appendix B.

% Here goes your for-loop that defines matrix A. See Appendix B.
... % You should remove the "..." in your final version of the code.
    % They are used here just to indicate where you put your work. 
% Immediately after goes any work that is needed to define the entries of A
% that do not fit the general pattern. See Appendix B. 
...
    
% Here goes your work defining the weight vector W(x).
% Note 1: It can be a for-loop, or it can be a command defining a vector in one line,
%         which ever you feel more comfortable with (see Note 1 above about defining 
%         the vector x). You may use the if- or while-loop inside the for-loop, if needed. 
% Note 2: I *strongly* recommend that you first make your code work for the case of a
%         uniform cable (i.e., constant W) and only then handle the case described in
%         the assignment. 
...
    
% Here goes your work of solving the linear system.
...
% Here goes your other work completing the vector that you will plot. See Appendix B.    
...
    
% Here goes your plotting work.
figure(241);  % This creates a unique figure for your plot. 
              % Specifying a figure is convenient if you have other figures open already
              % and do not your plot to be displayed in one of them. 
              % The number "241" has the following meaning:
              %    2 = Project's number; 
              %    4 = the number of step/part within the Project; 
              %    1 = figure's number in this part. 
              % You may, of course, design your own figure-numbering convention. 
% Do not forget to add labels to your axes. 
...

       