Azzera filtri
Azzera filtri

I am havng trouble with plotting this curve.

2 visualizzazioni (ultimi 30 giorni)
sade chandler
sade chandler il 29 Nov 2017
Commentato: VIGNESH BALAJI il 6 Set 2023
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')

Risposte (1)

Matt J
Matt J il 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 Commenti
DGM
DGM il 6 Set 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
VIGNESH BALAJI il 6 Set 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.

Accedi per commentare.

Tag

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by