linear regression matlab code
이전 댓글 표시
.
댓글 수: 7
Star Strider
2021년 12월 20일
Star Strider
2021년 12월 20일
Please carefully read the documentation page I linked to, then try again!
It is neither appropriate nor desirable to expect the MATLAB Answers contributors to solve homework problems.
In polite society, this is known as cheating and is never appropriate.
.
Rik
2021년 12월 20일
Do you see the irony of asking for help and then commenting 'please don't tell me what to do'?
The Matlab documentation is really good. It is actually very good advice to direct you to it.
If you respond with 'it failed', the only advice people can give you is: do something different.
The documentation contains examples. Did you try to adapt them to your data?
You can find guidelines for posting homework on this forum here. If you have trouble with Matlab basics you may consider doing the Onramp tutorial (which is provided for free by Mathworks). If your main issue is with understanding the underlying concept, you may consider re-reading the material you teacher provided and ask them for further clarification.
Rik
2021년 12월 20일
The original tags ("matlab code", "matlab compiler", "matlab", and "code") were replaced by "homework", "polyfit", "regression" and "I do not like help documentation", and the release (R2021b) was removed.
Additionally, the name of the OP was changed, I suspect in order to avoid their teacher finding this thread.
Original question:
linear regression matlab code
how can i write a matlab code with 2 datas and years. I want to make matlab code with linear regression. we have to plot this code
my datas: x=[128.46 125.90 123.90 121.96 117.89 114.89 110.41 107.47 105.59 103.45 101.79 99.66 97.53 94.91 93.45 93.14 91.98 90.11] for world
y=[132.20 126.23 121.04 117.65 113.95 114.40 113.66 111.01 108.84 111.25 110.24 107.92 105.45 103.43 101.01 96.98 92.53 89.08] for turkey
years=between 2000-2017
Eeee Yyyy
2021년 12월 20일
편집: Walter Roberson
2021년 12월 20일
Image Analyst
2021년 12월 20일
@Eeee Yyyy, well that really backfired on you. What you said reflects way more badly on you than on Rik and Star who've shown themselves over many years to be honorable, polite, and helpful. That may be the last question anyone ever answers from you.
Eeee Yyyy
2021년 12월 20일
답변 (1개)
Image Analyst
2021년 12월 20일
편집: Image Analyst
2021년 12월 20일
1 개 추천
See my attached polyfit demo. Adapt as needed.

카테고리
도움말 센터 및 File Exchange에서 Creating, Deleting, and Querying Graphics Objects에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!