i am new to matlab and i want to learn, can anyone help me with this please!!!!

2 次查看(过去 30 天)
I want to compute and plot the regression polynomial of degree 2 for some datapoints and than I want to estimate the value of the function at the point x¯ = 2.5 by using the obtained regression polynomial of degree 2
  3 个评论
John D'Errico
John D'Errico 2022-1-22
编辑:John D'Errico 2022-1-22
Since this is surely a homework problem, what have you tried? Why not use polyfit? If you have no idea how to use that tool, and cannot read the help, then you need to read the manuals. Spend some time with the various tutorials. The point being, there are plenty of simple tutorials to be found, and what you are asking for is already written up in the help.
Anas Gharsa
Anas Gharsa 2022-1-23
actually it is kind of practice for me it is not a home work!! like i said i am new to this!! all i am asking is some direction. however thank you for the answer

请先登录,再进行评论。

采纳的回答

Image Analyst
Image Analyst 2022-1-22
See my attached demo for polyfit. It will be easy for you to adapt it.
coefficients = polyfit(x, y, 2);
yFit = polyval(coefficients, 2.5);

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Descriptive Statistics 的更多信息

产品


版本

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by