Given two points in the vertical plane and a given length of rope, the supplied function computes the trajectory of the catenary between those points. Run plot_catenary.m for an interactive demo.
for a full description of the catenary curve.
Yuval (2021). Catenary - hanging rope between two points (https://www.mathworks.com/matlabcentral/fileexchange/38550-catenary-hanging-rope-between-two-points), MATLAB Central File Exchange. Retrieved .
However, there seems to be a problem with larger coordinates:
This works fine:
[x y]=catenary([-30 0],[30 0],100,20);
[x y]=catenary([-300 0],[300 0],1000,20);
Not sure where the threshold is or what the bug could be.
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!