Question: MATLAB CODE 1. Reminder, for submit to MATLAB coding problems, you should first work them in MATLAB, and use the test case to check your

 MATLAB CODE 1. Reminder, for submit to MATLAB coding problems, you

MATLAB CODE

1. Reminder, for submit to MATLAB coding problems, you should first work them in MATLAB, and use the test case to check your work. (copy and paste in test case to avoid 2336 typos) Assume these variables are already defined: X list - list of x values Y_list - list of y values X - single x value Write a MATLAB code segment that uses nlinfit to determine the best fit curve for the points in X_list and Y_list according to this equation 1 B +-ter y where A, B, and C are constants. Use initial guesses of A = 1, B = 2, and C = 0. Your results should be stored in a structure named fitData with the following fields: X: value of X Y : value of the equation evaluated at X A: coefficient A B: coceficient B C: coefficient C Example: clear all; clc; fornat compact; format short gi X_list = [1, 3, 5, 7, 9); Y list = [ 4.1954, 3.7485, 5.4772, 9.636, 15.68 ): X = 12: your code here fitData Should display this result in the command window fitData = X: 12 Y: 37.338 A: 1.8093 B: 2.2001 C: 8.3 Your code should work for any set of starting values. Do not include test cases, clear all, etc as part of your submission

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!