Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

instead of fortran, use MATLAB Exercise 3.3.9 Write a pair of Fortran subroutines to solve the least squares problem for the overdetermined system Ar b,

image text in transcribed

image text in transcribed

instead of fortran, use MATLAB

Exercise 3.3.9 Write a pair of Fortran subroutines to solve the least squares problem for the overdetermined system Ar b, where A ER*m, n > m, and A has full rank. 218 THE LEAST SQUARES PROBLEM The first subroutine uses reflectors to carry out a QR decomposition, A QR, where Q Rns product of reflectors: Q-QQm, and R Rnxm, where R is m-by-m and upper triangular. All of these operations should be carried out in a single n-by-m array plus one or two auxiliary vectors. If R has any zero pivots, the subroutine should set an error flag to indicate that A does not have full rank. The second subroutine uses the QR decomposition to find r. First cQTb QmQm-1. . Q1b is calculated by applying the reflectors successively. An additional one-dimensional array is needed for b. This array can also be used for c (and intermediate results). The solution x is found by solving Rx = by back substitution, . The solution should calculate ||d1, which is the Euclidean norm where cd of the residual. Use your subroutines to solve the following problems

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

If tant =-5/12 and 3?/2 If tan t and Answered: 1 week ago

Answered: 1 week ago