Project 1 - let's start with some math
Analyzing of data is very important, and knowing how to produce a straight-line relationship is often of great importance. You will need to construct a couple of functions that will work out something known as a linear regression analysis.
Requirements
The following is a brief list of requirements for our project:
- Data will come from two vectors and will be floating point numbers
- The answers will only be stored in main and displayed from there
- The two vectors must have the same number of elements
Supplied data
The data required for this project is in the Chapter 6
folder, Projects/MathsData.txt
. The content of the file should be used within the application (copy and paste). If the data sets do not have the same number of elements, remove elements from the end of the set with the larger number of elements.
Let's look at the math required:
- The equation of a straight line:
The equation is very simple:
y = mx + c, where m is the gradient and c is the intercept on...