Your aim is to write a programme that can read in a text based data file, which contains an unknown number of data points, and fit the data to a linear (straight line) form. The format of the data file is x, y, x y where x, y are the errors on the x and y values The data should be read in from the file and then the various sums calculated so that the a and b coefficients and their associated error can be computed (note that the error in x is not used in this analysis method).
Read the data into an array before performing the sums. You could just calculate the sums without reading it first into an array, but please do it this way to demonstrate that you know how to use arrays. (for the more advanced use a dynamically created array). Finally, make the programme modular so that there is a separate function for reading in the data (takes a filename as an argument and returns an array with the data and the number of datapoints), and a function for calculating the least squares coefficients (takes the arrary of data and the number of points as arguments and returns the coefficients and errors).
Décerné à :
7 freelance ont fait une offre moyenne de 111 £ pour ce travail
I have read and fully understand your requirements .. Please open chat to discuss further.... +++++++++===================+++++++++++++========================+++++++++
Hello! I can help you with the project by writing a clean C code with comments, following the specifications. I have done a similar program before with points interpolation.