Lab 2 regression Analysis solved
Lab 2 regression Analysis solved
Marks Obtained
Group Member Group Member
1 2
NAME MAHNOOR
REGISTRATION # 220701002
LAB REPORT 2
PERFORMANCE
TOTAL MARKS
DEADLINE: 10-03-2025
DATE OF SUBMISSION: 10-03-2025
❖ Open the curve fitting toolbox by typing the following command in the command
window.
>>cftool
LAB TASKS:
TASK 01
1. Create the vector consisting of the whole even numbers between 15 and 27
Code: Result:
2. Create the vector consisting of the whole odd numbers between 15 and 27.
Code: Result:
Code: Result:
TASK 02
❖ Let x = [2 5 1 6].
1. Add 16 to each element
Code: Result:
2. Add 3 to just the odd-index elements AND put the result in the even positions of the
original vector
TASK 03
Suppose we have a vector X which includes Area of plots and vector Y consisting of their
prices. Such that
MATLAB command window:
X= 10:10:90;
Y= [100,150,250,300,320,360,400,450,600];
Residual plot:
Conclusion:
From this lab, we have learned:
• How to perform regression analysis to find relationships between variables.
• The importance of evaluating model accuracy using goodness-of-fit metrics.
• Basic MATLAB operations for data manipulation and analysis.
• How to use MATLAB for vector operations and implementing regression models.