Question: 4- (25 Points) Polyfit/Polyval. You must make a single script file that contains commands for all sub-questions (from i to v ). You are asked

 4- (25 Points) Polyfit/Polyval. You must make a single script file

4- (25 Points) Polyfit/Polyval. You must make a single script file that contains commands for all sub-questions (from i to v ). You are asked to use polynomial functions to curve fit a series of data from the lab tests. The original 11 data points of [X,Y] are: [0,3],[0.9,2],[1.8,10],[2.7,21],[3.6,33],[4.5,45],[5.4,57],[6.3,67],[7.2,75], [8.1, 79], [9.0, 82] i. (4 Points) Generate two vectors X \& Y from the above listed data points for curve fitting. ii. (4 Points) Use Matlab command "randi([82, 86], 1, 2)" to generate two extra data points (two extra Y values) for X=9.9 and X=10.8. These two data points will be added to the original data points for polynomial curve fitting. iii. (2 Points) Plot the data pairs [X,Y] that are generated from step (ii). iv. (9 Points) Use 'polyfit' to create first, second and third order polynomial function fittings for the data from (ii). Please write down all three polynomial functions in comment lines (use % in your script) v. (6 Points) We want to predict the Y value for X=12. Please use the 1st,2nd, and 3rd order polynomial functions you obtained from (iv) to predict the Y value at X=12

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!