Answered step by step
Verified Expert Solution
Question
1 Approved Answer
5,(c)Please use Matlab and give me a code that can be executed directly and correctly,thanks! 5. Given data points as follows: where i is the
5,(c)Please use Matlab and give me a code that can be executed directly and correctly,thanks!
5. Given data points as follows: where i is the weighting factor to represent the reliability of the i-th data point. Use least-squares method to best fit these data points by the form of f(x)=c0+c1x+c2x2 (a) Derive the normal equations (including the weighting factors). (5 pts) (b) Use the normal equations developed in part (a) and the Gauss-Jordan direct method to compute the solution (digits aligned with given data through rounding method) step-by-step for the coefficients: c0,c1, and c2; and the deviation E(c0,c1,c2). (10 pt) (c) Use the normal equations developed in part (a) and the Gauss-Seidal indirect method to write a MATLAB code to compute coefficients: c0,c1, and c2; and the 2 deviation E(c0,c1,c2). Three iterations only and the initial guesses for c0,c1, and c2 are all zeros. (10 pts) (d) Follow your computer program developed in part (c), use hand calculations to check your computational results. Also compare your computation results with those obtained in part (b). (5 pts)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started