Files
lazarus-ccr/applications/lazstats/tests/generate_normalDist/NormalDist.pas
wp_xxyyzz 21484fc4bd LazStats: Add tests.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7925 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2020-12-05 19:03:07 +00:00

25 lines
356 B
ObjectPascal

program NormalDist;
uses
SysUtils, Math;
const
MEAN = 56;
STDDEV = 12;
N = 5; //200;
var
F: TextFile;
i: Integer;
x: Double;
begin
AssignFile(F, '../../data/normal_dist_5.csv');
Rewrite(F);
WriteLn(F, 'Index,Value');
for i := 1 to N do begin
x := RandG(MEAN, STDDEV);
WriteLn(F, i, ',', x:0:6);
end;
CloseFile(F);
end.