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:

The documentation for C_OpenExtremeStatistics describes the process of performing an extreme statistics analysis. In the MATLAB interface the typical call sequence would be:

Construction

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.

Properties and functions

Fit

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.

ExcessesOverThresholdCount

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.

ExcessesOverThreshold

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.

ToleranceIntervals

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.

Query

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.