필터 지우기
필터 지우기

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

조회 수: 1 (최근 30일)
Daniel Batts
Daniel Batts 2019년 3월 20일
댓글: Kevin Phung 2019년 3월 20일
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.

채택된 답변

Kevin Phung
Kevin Phung 2019년 3월 20일
편집: Kevin Phung 2019년 3월 20일
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
Daniel Batts
Daniel Batts 2019년 3월 20일
Thank you, really appericate it.
Kevin Phung
Kevin Phung 2019년 3월 20일
happy to help!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Specifying Target for Graphics Output에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by