int __stdcall NDK_RMS | ( | double * | X, |
size_t | N, | ||
WORD | reserved, | ||
double * | retVal | ||
) |
Returns the sample root mean square (RMS).
- Returns
- status code of the operation
- Return values
-
NDK_SUCCESS Operation successful NDK_FAILED Operation unsuccessful. See Macros for full list.
- Parameters
-
[in] X is the input data sample (a one/two dimensional array). [in] N is the number of observations in X. [in] reserved This parameter is reserved and must be 1. [out] retVal is the calculated value of this function.
- Remarks
- 1. The input time series data may include missing values (NaN), but they will not be included in the calculations.
- 2. The root mean square (RMS) is defined as follows for a set of \(n\) values \({x_1,x_2,...,x_n}\):
- \[\mathrm{RMS}=\sqrt{\frac{x_1^2+x_2^2+\cdots +x_N^2}{N}} =\sqrt{\frac{\sum_{i=1}^N {x_i^2}}{N}}\]
- Where:
- \(x_i\) is the value of the i-th non-missing observation.
- \(N\) is the number of non-missing observations in the input sample data.
- 4. The root mean square (RMS) is a statistical measure of the magnitude of a varying quantity.
- 5. The root mean square (RMS) has an interesting relationship to the mean ( \(\bar{x}\)) and the population standard deviation ( \(\sigma\)), such that:
- \[\mathrm{RMS}^2=\bar{x}^2+\sigma^2\]
- Requirements
-
Header SFSDK.H Library SFSDK.LIB DLL SFSDK.DLL
- Examples
-
Namespace: | NumXLAPI |
Class: | SFSDK |
Scope: | Public |
Lifetime: | Static |
int NDK_RMS | ( | double[] | pData, |
UIntPtr | nSize, | ||
short | argMenthod, | ||
ref double | retVal | ||
) |
Returns the sample root mean square (RMS).
- Return Value
-
a value from NDK_RETCODE enumeration for the status of the call.
NDK_SUCCESS operation successful Error Error Code
- Parameters
-
[in] pData is the input data sample (a one/two dimensional array). [in] nSize is the number of observations in pData. [in] argMenthod This parameter is reserved and must be 1. [out] retVal is the calculated value of this function.
- Remarks
- 1. The input time series data may include missing values (NaN), but they will not be included in the calculations.
- 2. The root mean square (RMS) is defined as follows for a set of \(n\) values \({x_1,x_2,...,x_n}\):
- \[\mathrm{RMS}=\sqrt{\frac{x_1^2+x_2^2+\cdots +x_N^2}{N}} =\sqrt{\frac{\sum_{i=1}^N {x_i^2}}{N}}\]
- Where:
- \(x_i\) is the value of the i-th non-missing observation.
- \(N\) is the number of non-missing observations in the input sample data.
- 4. The root mean square (RMS) is a statistical measure of the magnitude of a varying quantity.
- 5. The root mean square (RMS) has an interesting relationship to the mean ( \(\bar{x}\)) and the population standard deviation ( \(\sigma\)), such that:
- \[\mathrm{RMS}^2=\bar{x}^2+\sigma^2\]
- Exceptions
-
Exception Type Condition None N/A
- Requirements
-
Namespace NumXLAPI Class SFSDK Scope Public Lifetime Static Package NumXLAPI.DLL
- Examples
-
- References
- Hull, John C.; Options, Futures and Other DerivativesFinancial Times/ Prentice Hall (2011), ISBN 978-0132777421