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 18:10
An air compression refrigeration system is to have an air pressure of 100 psia in the brine tank and an allowable air temperature increase of 60°f for standard vapor compression cycle temperatures of 77 f entering the expansion cylinder and 14 f entering the compression cylinder, calculate the coefficient of performance a. 2.5 b 3.3 c. 4.0 d. 5.0
Answers: 3
question
Engineering, 04.07.2019 18:20
What is the heat treatment of metals? what is the benefit of it? why and how it's useful? answer in details, do not write by hand.
Answers: 3
question
Engineering, 04.07.2019 18:20
A3-mm-thick panel of aluminum alloy (k 177 w/m-k, c 875 j/kg-k and ? = 2770 kg/m) is finished on both sides with an epoxy coating that must be cured at or above t,-150°c for at least 5 min. the production line for the curing operation involves two steps: (1) heating in a large oven with air at ts,0-175°c and a convection coefficient of h, 40 w/m2. k, and (2) cooling in a large chamber with air at 25°c and a con- vection coefficient of he 10 w/m2.k. the heating portion of the process is conducted over a time interval te which exceeds the ime required to reach 150°c by 5 min (h = r + 300 s). the coating has an emissivity of ? = 0.8, and the temperatures of the oven and chamber walls are 175 and 25°c, respectively. if the panel is placed in the oven at an initial temperature of 25°c and removed from the chamber at a safe-to-touch tempera ture of 37°c, what is the total elapsed time for the two-step curing operation?
Answers: 3
question
Engineering, 04.07.2019 18:20
Asimple rankine cycle uses water as the working fluid. the water enters the turbine at 10 mpa and 480c while the condenser operates at 6 kpa. if the turbine has an isentropic efficiency of 80 percent while the pump has an isentropic efficiency of 70 percent determine the thermal efficiency
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
English, 24.06.2019 21:50
Questions on the website: 13722367