The source code done in matlab contains the models to implement the linear regression functions (Martinez & Martinez 39). In the general equation y = a1x + a0, y is replaced by PV, x by indicator and variable a, by aA. This gives the relationship between the X-axis and the Y-axis (Seber and Lee 63). The three expected output results are scattered dots for data output, one line for regression and standard deviation, one line for standard deviation and the third line for regression line of
The first step of developing this system involves the identification of the variables to use in the regression analysis. In this program, the two variables identified are PV and Indication of the solar irradiation. The next step is to develop models for linear regression to determine the relationship between the dependent and the independent variable (Chatterjee and Hadi 57). The third step is to develop a matlab source code file containing the model and able to access the source of data to be analysed. The fourth step is to test the program and remove errors.
Since the source code has been developed in matlab software, testing is done by executing the linearregression.m script. If any error is found to prevent the output from appearing, necessary correction is done in the source code (Weisberg 49).
The range of the y axis was between 5 and 50 while the x axis was set from 4 to 24. The results were successfully displayed as expected and all the three lines were drawn by the program. The standard deviation for the two variables is 2.34. This indicates that the two variables deviated from the actual mean by a difference of about 2.34.
The program was successful in implementing the linear regression between the two variables (Groß 42). It revealed that there is a positive correlation between PV output and the indication of solar irradiation. The scatered dots generate the best fit represented by the regression