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, 03.07.2019 14:10
When at a point two solid phase changes to one solid phase on cooling then it is known as a) eutectoid point b) eutectic point c) peritectic point d) peritectoid point
Answers: 3
question
Engineering, 04.07.2019 18:10
For the closed feedwater heater below, feedwater enters state 3 at a pressure of 2000 psia and temperature of 420 °f at a rate of ix10 ibhr. the feedwat extracted steam enters state 1 at a pressure of 1000 psia and enthalpy of 1500 btu/lbm. the extracted er leaves at an enthalpy of 528.7 btu/lbm steam leaves as a saturated liquid. (16) a) determine the mass flow rate of the extraction steam used to heat the feedwater (10) b) determine the terminal temperature difference of the closed feedwater heater
Answers: 3
question
Engineering, 04.07.2019 18:10
Assuming compressible flow of air and that the measurements are done at flagstaff a pitot static tube that gives the difference of total and static pressure measures 0.35 m of mercury. what is the velocity of air? assume the temperature to be 300k. (submit your excel or matlab calculation sheet)
Answers: 1
question
Engineering, 04.07.2019 18:10
Ahot wire operates at a temperature of 200°c while the air temperature is 20°c. the hot wire element is a tungsten wire of 5 um diameter and 2 mm in length. plot using excel current, heat transfer and heat generated by the wire for air velocity varying from 1-10 m/s in steps of lm/s? matlab the sensor voltage output, resistance, or assume nu 0.989 re033pr13 take air properties at tr (200°c20°c)/2 = 110°c properties of tungsten: c 0.13 kj/kg.k 3 p 19250 kg/m k (thermal conductivity) = 174 w/m.k
Answers: 2
You know the right answer?
Develop a function in matlab or python for general linear least square regression with the prototype...
Questions
question
Physics, 05.10.2019 13:30
question
Mathematics, 05.10.2019 13:30
Questions on the website: 13722360