A C++ command-line application for estimating seawater freezing temperatures from salinity data using least-squares linear regression.
- Project Context: Coursework project for Scientific Computing / C++ (NYU Abu Dhabi).
- Author: Ashmit Mukherjee.
The relationship between salinity (
[ T = m \cdot S + b ]
where slope (
[ m = \frac{\sum (S \cdot T) - n \cdot \overline{S} \cdot \overline{T}}{\sum (S^2) - n \cdot (\overline{S})^2} ] [ b = \overline{T} - m \cdot \overline{S} ]
(Historical note: While original course prompts may have casually referred to this calculation as "linear interpolation," the implemented algorithm computes a least-squares linear regression fit across multiple data points).
# Compile
g++ -std=c++17 main.cpp -o seawater_calc
# Run calculator
./seawater_calcSample interaction:
1
seawater_data.txt
2
seawater_data.txt
25
3
This repository's source code is licensed under the MIT License.