필터 지우기
필터 지우기

how can i solve

조회 수: 1 (최근 30일)
mohammed tharwat
mohammed tharwat 2015년 3월 22일
답변: Image Analyst 2015년 3월 22일
X 0 0.5 1.5 2 3 4 5
Y 0.32 2.6 7.05 11.74 15.83 22.3 25.9
a) Plot the data in the above table as 'diamonds' (not connected by line).
b) Obtain the best fitting line to the data. (Write the equation on this paper).
c) Add to the previous figure a plot of the best fitting line. Use more data points for this plot. Use x values ranging from 0 to 5 in a step of 0.1. This curve must be a line (without symbols).
d) Add grid to the plot.
  댓글 수: 2
Star Strider
Star Strider 2015년 3월 22일
Give it a go yourself this time.
You will need to read the plot, polyfit, polyval, and Colon(:) documentation.
Giorgos Papakonstantinou
Giorgos Papakonstantinou 2015년 3월 22일
Please take a look here.

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

채택된 답변

Image Analyst
Image Analyst 2015년 3월 22일
I imagine it's like the demo in the help but maybe a bit fancier. See attached demo (below the image it creates) that I've posted before. Adapt as needed.

추가 답변 (1개)

Konstantinos Sofos
Konstantinos Sofos 2015년 3월 22일
Hey,
a) doc plot (search how can you plot diamonds)
b) read the documentation for polyval and polyfit. As an example you may have a look here EXAMPLE
c) i think that the above example answer also to this
d) grid on
And the most important...
Kind regards

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by