Filter löschen
Filter löschen

I'm trying to plot these points, please help?

1 Ansicht (letzte 30 Tage)
Daniel Batts
Daniel Batts am 20 Mär. 2019
Kommentiert: Kevin Phung am 20 Mär. 2019
x(10-110) increments of 1
y=(W*L)*(sqrt((h^2)+(x^2)))/(h*x) (for every x value between 10-110)
W=500
L=120
h=50
Everytime I tried plotting x and y not all the y values from the formula would show on the graph, along with there being no line to show the change of Y/X.

Akzeptierte Antwort

Kevin Phung
Kevin Phung am 20 Mär. 2019
Bearbeitet: Kevin Phung am 20 Mär. 2019
x=10:1:110;
W=500;
L=120;
h=50;
y=(W*L)*(sqrt((h^2)+(x.^2)))./(h.*x) ;
figure
plot(x,y)
things to note:
  • define the variables BEFORE evaluating them in an equation.
  • dot operator for element wise multiplication / division
  2 Kommentare
Daniel Batts
Daniel Batts am 20 Mär. 2019
Thank you, really appericate it.
Kevin Phung
Kevin Phung am 20 Mär. 2019
happy to help!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Specifying Target for Graphics Output finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by