Databases Reference
In-Depth Information
FIGURE 9.17 Comparison of consistent system solutions.
It is obvious upon inspection that the solution without the a 0 term is perfect, as the residuals
are all 0, and indicate no deviation between the model and the data. The solution with the a 0 term,
however, leaves more to be desired. The residuals show a deviation between the model and the
actual data. Although the matrix in this solution is better conditioned than the matrix utilized in
the former solution (20.858 vs. 34.450), the solution converged upon is less optimal than that of
the solution with the a 0 term omitted. Thus, better conditioning is not always indicative of a superior
solution set.
9.6
THE INNER WORKINGS OF THE MULTIPLE
LINEAR REGRESSION EXAMPLE
The discussion so far has focused on the use of the MLR Matlab tool, but it is the mechanisms
that the tool utilizes to work that will be of paramount interest to the reader. When the Calculate
button is pressed, a series of actions take place that accomplish the following:
1.
A Matlab ActiveX server is initiated.
2.
The required data is extracted from the Worksheet.
3.
The Extracted Data is formatted into Matlab-friendly strings.
4.
The Formatted Data is sent to Matlab.
5.
Commands are sent to Matlab to perform the required operations.
6.
The results from the Matlab operations are returned to Excel.
7.
The returned results from Matlab are parsed.
8.
The parsed results are written to the designated area of the Worksheet.
It all begins with the code behind the calculate button:
Private Sub CalculateButton_Click()
'Save Settings to Windows Registry
Search WWH ::




Custom Search