function Y=sistem(X,par) %leva stran sistema enacb za veriznico / function that %returns the right-hand side of the equation for the catenary a=X(1);%neznanki a in b / the unknowns a and b b=X(2); H=par(1);%visinska razlika / hight difference L=par(2);%dolzina vrvi / length of wire D=par(3);%razpon / distance to be bridged Y=[a*(cosh(b/a)-cosh((b-D)/a))-H;a*(sinh(b/a)-sinh((b-D)/a))-L];%leva stran enacb end