curve fitting.ipynb - Colab
curve fitting.ipynb - Colab
# Given data
L = np.array([40, 50, 60, 70, 80, 90, 100, 110, 120]) # Independent variable (X)
T = np.array([1.313, 1.442, 1.557, 1.668, 1.787, 1.848, 2.016, 2.139, 2.273]) # Dependent variable (Y)
# Predicted values
T_pred = m * L + b
import numpy as np
import matplotlib.pyplot as plt
# Given data
x = np.array([1, 2, 3, 4, 5, 6]) # Independent variable
y = np.array([1.01, 4.03, 8.98, 16.25, 25.01, 35.72]) # Dependent variable