with MathAK; use MathAK; with MatrAK; use MatrAK; procedure Cross is ---------------------------------------------------------------------- ---------------------------------------------------------------------- X : Vector_Type ( 0..999 ) := ( others => 0.0 ); Y : Vector_Type ( X'range ) := ( others => 0.0 ); Freq : float := 0.002; R : Vector_Type ( X'range ); begin X ( 200 ) := 1.0; for Index in Y'range loop Y ( Index ) := float ( ( Index / 100 ) mod 2 ); -- Y ( Index ) := Sin ( 2.0 * Pi * Freq * float ( Index ) ); end loop; R := Crosscorrelation ( X, Y ); Save ( Matrix_Convert ( R ), "Cross.Dat" ); R := Crosscorrelation ( Y, Y ); Save ( Matrix_Convert ( R ), "AutoCorr.Dat" ); end Cross;