Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Least Squares Polynomial Fits Write the MATLAB function x = clsq (A, b, B, d) that solves the equality constrained least squares problem min_x{||Ax-b||_2: Bx
Least Squares Polynomial Fits Write the MATLAB function x = clsq (A, b, B, d) that solves the equality constrained least squares problem min_x{||Ax-b||_2: Bx = d] for the case that A is 1-1 and B is onto. Use the QR factorization on B as described in class, and call lsq() to handle the unconstrained sub-problem. Find the best Least Squares polynomials p(x) = sigma^n_i=0 alpha_ix^i of degrees n = 1, 2, 3 and 4 that fits the data {(0.0042, 0.9924), (0.2025, 0.9434), (0.1080.0.4941), (0.5968, 0.4535), (0.7999, 0.1985), (0.9970, 0.2272)}. Also find the polynomial interpolant (of appropriate degree) and the quadratic least squares fit with constraints p(xi) = y_1, p(x_6) = y6 and p'(x_6) = D where D the first divided difference between (x_5, y_5) and (x_6, y_6). Once von get your coefficients alpha. you can use poly val () to evaluate the polynomial and plot. Least Squares Polynomial Fits Write the MATLAB function x = clsq (A, b, B, d) that solves the equality constrained least squares problem min_x{||Ax-b||_2: Bx = d] for the case that A is 1-1 and B is onto. Use the QR factorization on B as described in class, and call lsq() to handle the unconstrained sub-problem. Find the best Least Squares polynomials p(x) = sigma^n_i=0 alpha_ix^i of degrees n = 1, 2, 3 and 4 that fits the data {(0.0042, 0.9924), (0.2025, 0.9434), (0.1080.0.4941), (0.5968, 0.4535), (0.7999, 0.1985), (0.9970, 0.2272)}. Also find the polynomial interpolant (of appropriate degree) and the quadratic least squares fit with constraints p(xi) = y_1, p(x_6) = y6 and p'(x_6) = D where D the first divided difference between (x_5, y_5) and (x_6, y_6). Once von get your coefficients alpha. you can use poly val () to evaluate the polynomial and plot
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