function RMS: Double;
Root mean square (RMS).
Returns: Double
Remarks:
Calculate the root mean square value for all calling object elements in-place. The root mean square (RMS) is defined by the equation:
Examples
var a: Matrix;
c: double;
begin
a.SetIt(1,4,False,[1,2,3,4]);
c := a.RMS;
end;
var
a: Matrix;
result: double;
begin
a := [[1.0, 2.0], [3.0, 4.0]];
result := a.RMS;
if Abs(result - 2.73861278752583) > 1e-10 then
raise Exception.Create('Matrix.RMS: expected 2.73861278752583, got ' + result.ToString);
end;
See Also: Matrix.StdDev
Indexed: function RMS(Index: Integer; Len: Integer): Double;
Calculate the RMS for calling object elements [Index]..[Index+Len-1] in-place.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Index | Integer | start index |
| 2 | Len | Integer | element count |
Returns: Double
Remarks:
An exception is raised if array borders are overrun.