Geometrically exact matlab beam code