I am havng trouble with plotting this curve.
4 views (last 30 days)
Show older comments
Cables are used to suspend bridge decks and other structures. If a heavy uniform cable hangs suspended from its two endpoints, it takes the shape of a catenary curve whose equation is where a is the height of the lowest point on the chain above some horizontal reference line, x is the horizontal coordinate measured to the right from the lowest point, and y is the vertical coordinate measured up from the reference line. Let a % 10 m. Plot the catenary curve for !20 # x # 30 m. How high is each endpoint?
So far I have
a=10 , y=a*cosh(x/a), x=-20:0.01:30; and plot(x,y),xlabel('x'),ylabel('y')
0 Comments
Answers (1)
Matt J
on 29 Nov 2017
Since y depends on x, you must define x first:
a=10 ,
x=-20:0.01:30;
y=a*cosh(x/a),
plot(x,y),xlabel('x'),ylabel('y')
3 Comments
DGM
on 6 Sep 2023
The curve is symmetric about x=0; since the vector x is not symmetric about 0, the endpoints are not the same height.
a = 10; % the height of the curve at x=0
x = -30:0.01:30; % x is now symmetric
y = a*cosh(x/a);
plot(x,y),xlabel('x'),ylabel('y')
VIGNESH BALAJI
on 6 Sep 2023
@DGM thank you for the nice explanation.
What should I do, if I want to draw a catenary at different heights entirely on positive x axis (with fixed y at both ends)?
I have been trying to do it.
See Also
Categories
Find more on Surface and Mesh Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!