The document describes developing a Matlab program to perform linear regression on given x and y data points. It provides sample x and y data and computes interpolated y values for given x values using spline interpolation. The output displays the interpolated y values.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
41 views4 pages
ASS 6 - ANS (Interpolation)
The document describes developing a Matlab program to perform linear regression on given x and y data points. It provides sample x and y data and computes interpolated y values for given x values using spline interpolation. The output displays the interpolated y values.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4
School of Chemical Engineering
Winter Semester – 2020 / 21
CHE3001 – COMPUTATIONAL METHODS IN PROCESS ENGINEERING Experiment- 6 Name =SISAY AMARE NIGUSSIE Reg no =18BCM0149 Problem statement 6. Construct a generic Mat Lab program to perform a linear regression for a given data scatter of ‘x and ‘y’ such that y = f(x). Inputs: i) Range of values for ‘x’ and ‘y’ ii) Value (s) of ‘x’ for which computation of ‘y’ is required Check for the necessary criteria for the entered data. Print the computed ‘y’ value for the given ‘x’ value as the output. Validate the developed code for the following data. X 0.5 1 3 4 8 10 Y -7.25 -3 4 15 26 20
Compute the value of y for x = 5, 6, 7, and 9.
Solutions: Aim: To Develop a generic Mat Lab program to solve a given linear regression for a given data scatter. Interpolation technique is used for adding new data points within a range of a set of known data points. Theory: Interpolation is a technique for adding new data points within a range of a set of known data points. We can use interpolation to fill-in missing data, smooth existing data, make predictions, and more. Interpolation in Mat lab is divided into techniques for data points on a grid and scattered data points.
Flowchart:
Input: x = [0.5, 1, 3, 4, 8, 10]; Y = [-7.25, -3, 4, 15, 26, 20]; xI = [5, 6, 7, 9]; YI = spline(x,Y, xI);