Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Notes: Use MATLAB to write code in order to solve the following questions. * Cheating from any other student andor website is strictly prohibited and

image text in transcribed

image text in transcribed

Notes: Use MATLAB to write code in order to solve the following questions. * Cheating from any other student andor website is strictly prohibited and may result in losing assignment points or even downgrading in your final grade. .Two people are allowed to work as a group. Only one student per group can submit the assignment but please clearly mention the name of the group partner and his student ID .Your program code should be properly commented; your evaluation will include being able to explain your code. Submission Items: Submit file) when you run the program for the conditions mentioned in the questions below e(s) and Question l: [13 points] Note: Do not use MATLAB build-in functions for regression (a) Write a MATLAB function that accepts n values of x and yi perform Linear Regression and returns values of r and, the model parameters a and a1 (b) Write another MATLAB function that accepts n values of x and y (provided as arrays), checks for Linear, Power and Saturation growth-rate models, and estimate the values of parameters ao and a1 (or and , whichever is applicable). In all three methods, the function should use the function developed in part (a) to perform the linear regression part. Plot the data and the three models (one linear and two non-linear) on the same graph (use distinct colors/shades of lines to differentiate). The function should return a number from 1-3 indicating the model with the best fit, ts , and the estimated values of parameters. Call the function from the command window with the data given below, capture the image of the output showing the returned values, and the graph, and include these in the Word document for submission. x 0.75 234 8 8.5 y2195 2 24 24 2726 Question 2i [7 points] Write a MATLAB function that accepts (n +1) values of x and yi, fits nh order polynomial, evaluate it for certain x value using Lagrange Interpolating Polynomial, and returns the value of y at x Call this function from the command window with the data given in Question, evaluate y at x7, and capture the image of the output. Refer to Figure 18.11 for the Pseudocode of the method. Notes: Use MATLAB to write code in order to solve the following questions. * Cheating from any other student andor website is strictly prohibited and may result in losing assignment points or even downgrading in your final grade. .Two people are allowed to work as a group. Only one student per group can submit the assignment but please clearly mention the name of the group partner and his student ID .Your program code should be properly commented; your evaluation will include being able to explain your code. Submission Items: Submit file) when you run the program for the conditions mentioned in the questions below e(s) and Question l: [13 points] Note: Do not use MATLAB build-in functions for regression (a) Write a MATLAB function that accepts n values of x and yi perform Linear Regression and returns values of r and, the model parameters a and a1 (b) Write another MATLAB function that accepts n values of x and y (provided as arrays), checks for Linear, Power and Saturation growth-rate models, and estimate the values of parameters ao and a1 (or and , whichever is applicable). In all three methods, the function should use the function developed in part (a) to perform the linear regression part. Plot the data and the three models (one linear and two non-linear) on the same graph (use distinct colors/shades of lines to differentiate). The function should return a number from 1-3 indicating the model with the best fit, ts , and the estimated values of parameters. Call the function from the command window with the data given below, capture the image of the output showing the returned values, and the graph, and include these in the Word document for submission. x 0.75 234 8 8.5 y2195 2 24 24 2726 Question 2i [7 points] Write a MATLAB function that accepts (n +1) values of x and yi, fits nh order polynomial, evaluate it for certain x value using Lagrange Interpolating Polynomial, and returns the value of y at x Call this function from the command window with the data given in Question, evaluate y at x7, and capture the image of the output. Refer to Figure 18.11 for the Pseudocode of the method

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Microsoft Visual Basic 2008 Comprehensive Concepts And Techniques

Authors: Gary B. Shelly, Corinne Hoisington

1st Edition

1423927168, 978-1423927167

Students also viewed these Databases questions