I am havng trouble with plotting this curve.
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (1)
Matt J
el 29 de Nov. de 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 comentarios
DGM
el 6 de Sept. de 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
el 6 de Sept. de 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.
Ver también
Categorías
Más información sobre Surface and Mesh Plots en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!