Question: Develop a Matlab function myCubicFit that calculates the coefficients a 0 through a 3 of the cubic polynomial f ( x ) = a 0
Develop a Matlab function myCubicFit that calculates the coefficients through of the cubic polynomial
that best fits given data points The input arguments to the function must be the two
vectors and that contain the values of the data points. The output of the function shall be a fourelement column
vector a that contains the values of through and the error of the fit defined as the sum of the squares of the
residuals. Do NOT use any Matlab buildin functions to solve the required system of linear equations. Instead use
myGaussJordan from Module Use Matlab's 'operator to calculate the transpose of a matrix and to calculate the
product of matrices. Inside the function check that the length of the vectors and is the same. If not, display an
error message, set the vector a and to realmax and exit the function.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
