Question: Learning Check 2: Matlab Coding Polynomials My Solutions > Please code up a matlab function to solve for the coefficients of the following equation (note:


Learning Check 2: Matlab Coding Polynomials My Solutions > Please code up a matlab function to solve for the coefficients of the following equation (note: use sin in radians NOT degrees for this problem): y(x) = ax + bx2 + cx + d sin(x) +e The function should accept as inputs row vectors of x- and y-values: X = ( x1, x2, x3, x4, x5] y = [y1, y2, y3, y4, y5] The function should return a row vector of values: VecReturn = [a, b, c, d, e) Function Save C Reset DI MATLAB Documentation 1 function [VecReturn) = fitFunction(x,y); 2 4 5 6 end 7 Code to call your function C Reset 1 x = (1 2 3 4 5); 2 y = [2 3 8 5 2]; 3 VOut = fitFunction(x,y) 6 end 7 Code to call your function C Reset 1 x = (1 2 3 4 5); y = [2 3 8 5 2]; 3 Vout = fitFunction(x,y) Run Function ? Previous Assessment: 0 of 1 Tests Passed Submit % This checks the coefficients you found to see if they are correct. Follow the steps for linear systems: 1 - setup the system of equations 2 - convert it into a system of matrix equations 3 - Solve 4 - Make sure you are handing back the answer as requested! 2020 The MathWorks, Inc
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
