x = 1:10; y = x.^2; figure; scatter(x, y); lsline; calcResiduals(x, y)
Mehul Gajwani, Monash University, 2024