function [xlmat2] =titleheader(num)
%TITLEHEADER This function creates the column title for the output file.
%Its inputs are the number of positions that you are measuring for each
%subject

xlmat2={'Subject'};

for i=1:num
    xlmat={...
        ['Sagittal Cobb Angle_P' num2str(i)];
        ['Coronal Cobb Angle_P' num2str(i)];...
        ['Upper Cobb Angle_P' num2str(i)];...
        ['Lower Cobb Angle_P' num2str(i)];...
        ['Horizontal Angle_P' num2str(i)];...
        ['Theta (Sag)_L1-L2_P' num2str(i)];...
        ['Psi (Cor)_L1-L2_P' num2str(i)];...
        ['Phi (Axi)_L1-L2_P' num2str(i)];...
        ['DAnterior_L1-L2_P' num2str(i)];...
        ['DCenter_L1-L2_P' num2str(i)];...
        ['DPosterior_L1-L2_P' num2str(i)];...
        ['Theta (Sag)_L2-L3_P' num2str(i)];...
        ['Psi (Cor)_L2-L3_P' num2str(i)];...
        ['Phi (Axi)_L2-L3_P' num2str(i)];...
        ['DAnterior_L2-L3_P' num2str(i)];...
        ['DCenter_L2-L3_P' num2str(i)];...
        ['DPosterior_L2-L3_P' num2str(i)];...
        ['Theta (Sag)_L3-L4_P' num2str(i)];...
        ['Psi (Cor)_L3-L4_P' num2str(i)];...
        ['Phi (Axi)_L3-L4_P' num2str(i)];...
        ['DAnterior_L3-L4_P' num2str(i)];...
        ['DCenter_L3-L4_P' num2str(i)];...
        ['DPosterior_L3-L4_P' num2str(i)];...
        ['Theta (Sag)_L4-L5_P' num2str(i)];...
        ['Psi (Cor)_L4-L5_P' num2str(i)];...
        ['Phi (Axi)_L4-L5_P' num2str(i)];...
        ['DAnterior_L4-L5_P' num2str(i)];...
        ['DCenter_L4-L5_P' num2str(i)];...
        ['DPosterior_L4-L5_P' num2str(i)];...
        ['Theta (Sag)_L5-S1_P' num2str(i)];...
        ['Psi (Cor)_L5-S1_P' num2str(i)];...
        ['Phi (Axi)_L5-S1_P' num2str(i)];...
        ['DAnterior_L5-S1_P' num2str(i)];...
        ['DCenter_L5-S1_P' num2str(i)];...
        ['DPosterior_L5-S1_P' num2str(i)]
        }';
    xlmat2=[xlmat2 xlmat];
end
end

