|
|
MATLAB reference: ofxExtremeStatistics |
The class ofxExtremeStatistics is the MATLAB interface to the OrcaFlex extreme statistics results analysis functions. This class encapsulates the following functions from the C API:
C_OpenExtremeStatistics
C_CalculateExtremeStatisticsExcessesOverThreshold
C_SimulateToleranceIntervals
C_FitExtremeStatistics
C_QueryExtremeStatistics
C_CloseExtremeStatistics
The documentation for C_OpenExtremeStatistics describes the process of performing an extreme statistics analysis. In the MATLAB interface the typical call sequence would be:
ofxExtremeStatistics object.ExcessesOverThreshold to determine a suitable threshold value for the Weibull and GPD distributions.Fit to fit the distribution to the data.Query to extract results (this can be called more than once).This class is normally created by calling the ofxObject function ExtremeStatistics, for example:
extremeStats = line.ExtremeStatistics('Elevation', ofx.oeEnvironment(0,0,0))
This call would create an ofxExtremeStatistics object from a wave elevation time history. This class can also be created directly:
extremeStats = ofx.ExtremeStatistics(values, sampleInterval)
Here, the values parameter is an array of values and sampleInterval the time interval (in seconds) between them. The constructor calls the C API function C_OpenExtremeStatistics.
extremeStats.Fit(specification)
This function fits the distribution specified in the specification parameter. The specification parameter is a structure that represents the C API structure TExtremeStatisticsSpecification and has the same fields. A specification structure is obtained by calling the helper functions ofx.RayleighStatisticsSpecification and ofx.LikelihoodStatisticsSpecification. This function calls the C API function C_FitExtremeStatistics.
count = extremeStats.ExcessesOverThresholdCount(specification)
This function returns the number of excesses over the threshold specified in specification. If ofxExtremeStatistics.Fit has just been called then the specification parameter can be omitted. This function calls the C API function C_CalculateExtremeStatisticsExcessesOverThreshold.
excesses = extremeStats.ExcessesOverThreshold(specification)
This function returns an array of excess values over the threshold specified in specification. If ofxExtremeStatistics.Fit has just been called then the specification parameter can be omitted. This function calls the C API function C_CalculateExtremeStatisticsExcessesOverThreshold.
intervals = extremeStats.ToleranceIntervals([simulatedDataSetCount])
This function calls the C API function C_SimulateToleranceIntervals to simulate tolerance intervals for the fitted distribution. The simulatedDataSetCount parameter specifies the number of simulated data sets used to generate the tolerance intervals. If omitted the default value of 1000 is used, which is the value used by OrcaFlex. The function returns an array of interval structures that correspond to the C API TInterval.
extremeStatsOutput = extremeStats.Query(query)
This function is called to query the extreme statistics data once the distribution has been fitted. The query parameter is a structure that represents the C API structure TExtremeStatisticsQuery. This structure is obtained by calling the helper functions ofx.RayleighStatisticsQuery and ofx.LikelihoodStatisticsQuery. The result returned by this function is a structure with the same fields as the C API structure TExtremeStatisticsOutput.