subject
Engineering, 18.11.2019 23:31 brusierlover8590

Develop a function in matlab or python for general linear least square regression with the prototype given below (in matlab): function [a, r2]=genreg(func, x,y) % generates a general regression curve and % plots the curve along with data points % [a, r2]=genreg(func, x,y) % input: % func: name of the function calculating the basis function (z) % x, y: data points % output: % a: regression curve coefficients % r2: coefficient of determination % calculate the regression curve coefficients (a) z=func(x); % calculate r2 % plot the regression curve along with the data end where the input argument func is a separate m-file function calculating the basis functions z1, . . , zm. test your function by fitting a second order polynomial y = a0 + a1x + a2x 2 to the following data. report your results for a0, a1 and a2 as well as the coefficient of determination (r 2 ). show a plot of the regression curve along with the data. x 0 1 2 3 4 5 y 2.1 7.7 13.6 27.2 40.9 61.1

ansver
Answers: 3

Another question on Engineering

question
Engineering, 04.07.2019 16:10
The force on a cutting tool are 2600n vertically downward and 2100 horizontal. determine the resultant force acting on the tool and the angle at which it acts.
Answers: 1
question
Engineering, 04.07.2019 18:10
Water at 70°f and streams enter the mixing chamber at the same mass flow rate, determine the temperature and the quality of the exiting stream. 0 psia is heated in a chamber by mixing it with saturated water vapor at 20 psia. if both streams enters the mixing chamber at the same mass flow rate, determine the temperature and the quality of the existing system.
Answers: 2
question
Engineering, 04.07.2019 18:10
Apipe with an outside diameter of 15 cm is exposed to an ambient air and surrounding temperature of -20°c. the pipe has an outer surface temperature of 65°c and an emissivity of 0.85. if the rate of heat loss from the pipe surface is 0.95 kw per meter of length, the external convective heat transfer coefficient (h) is: (a) 12.5 w/m"k (b) 18.6 w/mk (c) 23.7 w/mk (d) 27.9 w/mk (e) 33.5 w/mk
Answers: 1
question
Engineering, 04.07.2019 18:10
Slip occurs via two partial dislocations because of (a) the shorter path of the partial dislocation lines; (b) the lower energy state through partial dislocations; (c) the charge balance.
Answers: 1
You know the right answer?
Develop a function in matlab or python for general linear least square regression with the prototype...
Questions
question
Mathematics, 25.11.2019 04:31
Questions on the website: 13722363