Question: Solve tasks a) and b) using given info (b) Write a program in a script file that plots the data points and the curve of

Solve tasks a) and b) using given infoSolve tasks a) and b) using given info (b) Write a program

in a script file that plots the data points and the curve

(b) Write a program in a script file that plots the data points and the curve of the cubic polynomial that best fits the data

1. Write a MatLab user-defined function that determines the coefficients of a cubic polynomial, f(x) = azx? + a,x + ax + a, , that best fits a given set of data points. The function should also calculate the overall error E. Name the function (a,Er] = CubPolFit(x,y), where the input arguments x and y are vectors with the coordinates of the data points, and the output argument a is a four-element vector with the values of the coefficients az,a,,a,,a, . The output argument Er is the value of the overall error. (a) Use CubPolFit to find the cubic polynomial that best fits the data in the rubber tension tests (see below A tension test is conducted for determining the stress-strain behavior of rubber. The data points from the test are shown in the figure, and their values are given below. Determine the fourth order polynomial that best fits the data points. Make a plot of the data points and the curve that corresponds to the polynomial. Strain e Stress o(MPa) Straine Stress o(MPa) 0 0.4 0 3.0 2.8 3.2 7.4 9.6 0.8 1.2 4.5 5.8 3.6 4.0 15.6 20.7 1.6 5.9 4.4 26.7 2.0 5.8 4.8 31.1 2.4 6.2 5.2 35.6 6.0 5.6 39.3 41.5 45 40 35 30 Stress (MPa) 20 o 15 10 o o O O 5 o o OG 1 2. 3 Strain | 1. Write a MatLab user-defined function that determines the coefficients of a cubic polynomial, f(x) = azx? + a,x + ax + a, , that best fits a given set of data points. The function should also calculate the overall error E. Name the function (a,Er] = CubPolFit(x,y), where the input arguments x and y are vectors with the coordinates of the data points, and the output argument a is a four-element vector with the values of the coefficients az,a,,a,,a, . The output argument Er is the value of the overall error. (a) Use CubPolFit to find the cubic polynomial that best fits the data in the rubber tension tests (see below A tension test is conducted for determining the stress-strain behavior of rubber. The data points from the test are shown in the figure, and their values are given below. Determine the fourth order polynomial that best fits the data points. Make a plot of the data points and the curve that corresponds to the polynomial. Strain e Stress o(MPa) Straine Stress o(MPa) 0 0.4 0 3.0 2.8 3.2 7.4 9.6 0.8 1.2 4.5 5.8 3.6 4.0 15.6 20.7 1.6 5.9 4.4 26.7 2.0 5.8 4.8 31.1 2.4 6.2 5.2 35.6 6.0 5.6 39.3 41.5 45 40 35 30 Stress (MPa) 20 o 15 10 o o O O 5 o o OG 1 2. 3 Strain |

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!