I am havng trouble with plotting this curve.
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (1)
Matt J
le 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 commentaires
DGM
le 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
le 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.
Voir également
Catégories
En savoir plus sur Surface and Mesh Plots dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!