【RS_Average】
[code]inputs:RowToAvg( numericsimple ),
NumDays( numericsimple ),
Offset( numericsimple ),
DataArray[ Twelve, MaxNumDays ]( numericarray ),
Index( numericsimple ) ;
variables:
var0( 0 ),
var1( 0 ),
var2( 0 ) ;
var0 = MaxNumDays + 1 ;
var1 = Index + Offset ;
var2 = 0 ;
for Value1 = 1 to NumDays
begin
Value2 = Mod( var1 + Value1, var0 ) ;
var2 = var2 + DataArray[ RowToAvg, Value2 ] ;
end ;
RS_Average = var2 / NumDays ;
[/code]
页:
[1]