Example: a cubic regression of a 6-point {(x,yDi=1:6 problem, using the polynomial coefficients a= [ 3.0000 2.0000 -1.00

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

Example: a cubic regression of a 6-point {(x,yDi=1:6 problem, using the polynomial coefficients a= [ 3.0000 2.0000 -1.00

Post by answerhappygod »

Example A Cubic Regression Of A 6 Point X Ydi 1 6 Problem Using The Polynomial Coefficients A 3 0000 2 0000 1 00 1
Example A Cubic Regression Of A 6 Point X Ydi 1 6 Problem Using The Polynomial Coefficients A 3 0000 2 0000 1 00 1 (59.97 KiB) Viewed 40 times
Example A Cubic Regression Of A 6 Point X Ydi 1 6 Problem Using The Polynomial Coefficients A 3 0000 2 0000 1 00 2
Example A Cubic Regression Of A 6 Point X Ydi 1 6 Problem Using The Polynomial Coefficients A 3 0000 2 0000 1 00 2 (19.59 KiB) Viewed 40 times
Example: a cubic regression of a 6-point {(x,yDi=1:6 problem, using the polynomial coefficients a= [ 3.0000 2.0000 -1.0000 5.0000] х -1.0000 1.2000 1.6000 3.5000 5.5000 6.0000 у ym=y+noise 5.0000 5.3376 11.8640 12.8641 20.8080 19.1438 154.6250 154.0350 559.1250 558.8469 719.0000 719.4227 % Two step least-error-estimation of the cubic polynomial % regression by eqs. (2) and (3). A=[x. 3 x. 2 x ones (6,1)); z=(A'*A) \A'*ym; % z=[ 3.0265 1.8882 -1.2637 5.2693] % this estimate is based on some noise-randn(6, 1) embedded in ym. X3=linspace(-2,7,200); P3-polyfit(x,ym,3); % get cubic poly. coefficient estimate $ note that this P3=2 y3-polyval (P3, 3); figure;plot(x,ym,'o',X3,3); grid
a. Find the interpolating polynomial over the given 6-point data set. b. Show the matrix A, z and P5=polyfit(x, ym, 5) c. Interpolate the output at x = 2.7, i.e. show p(2.7). Try: yhat = polyval(P5, 2.7) d. Show plot of (x, ym, 'o') and (x,y) from this interpolation, where x=linspace(-2,7,100) and y = p(x)
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply