Accessing the Matrix Library via the MatrixObject
Statistica contains a MatrixObject object that encapsulates the Matrix library, allowing you to take full advantage of Statistica's rich collection of matrix functions without having to include the STB library explicitly. To use this method, simply refer to the MatrixObject directly (as you would any other variable) and call its member functions with the "." operator. The following example demonstrates how to perform some basic matrix operations using the MatrixObject.
Dim DataArray() As Double Dim spr As Spreadsheet 'open the Cars dataset Set spr = Spreadsheets.Open(Path & "\Examples\Datasets\Cars.sta",False) 'display it in a new spreadsheet MatrixObject.MatrixDisplay(spr.Data,"Cars Dataset") 'load the spreadsheet into a matrix ReDim DataArray(spr.NumberOfCases,spr.NumberOfVariables) MatrixObject.MatrixDuplicate(spr.Data,DataArray()) MatrixObject.MatrixDisplay(DataArray(),"Cars Dataset via a Matrix") spr.Close(False)