Hi there, I have used Matlab to plot some data points of mu vs redshift for supernovae type Ia, and then I have plotted a model to compare them with. The model was a differential equation solved with ode45. I am not sure how I will find chi-squared either manually (as I do not know the equation of the curve of the model) or using Matlab. I have tried looking it up but am still having difficulty. Could anyone give me some advice? Thanks!