% Calculates the tauA and tauB coefficients for a member given:
%   L1, L2, L3 = segment lengths of the member, scalars
%   m1, m2, m3 = modulus factors of the member, scalars
function [tau_A tau_B] = Get_tau(L1, L2, L3, m1, m2, m3) 
    % Verify input
    if (length(L1) ~= 1 || length(L2) ~= 1 || length(L3)~=1 ||...
            length(m1)~=1 || length(m2) ~= 1|| length(m3)~=1)
        tau_A = -100;
        tau_B = -100;
        return;
    end
    L = L1+L2+L3;
    tau_A = 1/m1*(L1/L)^3 + 1/m2*(((L1+L2)/L)^3 - (L1/L)^3) + 1/m3*(1-((L1+L2)/L)^3 );
    tau_B = 1/m3*(L3/L)^3 + 1/m2*(((L3+L2)/L)^3 - (L3/L)^3) + 1/m1*(1-((L3+L2)/L)^3 );
    
end