Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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 submissionStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started