#!/usr/bin/perl -w

use 5.034;

my $SAVE = 0;
my $c = 0;
my @record;
my $cc = 0;
my $ngraphs = 100;
my $npoints = 160;
my $base = 100;

while (++$cc <= $ngraphs){
    @record=();
    $record[0] = $base;
    $c = 0;
    while (++$c <= $npoints){
	$record[$c] = $record[$c-1] + (rand() - 0.5);
    }
    say "$cc";
    system "XY @record";   # XYfile para más datos
    system "echo \"@record\" > $0.$cc.out" if $SAVE;
    sleep 2;
}

exit 3;

