Hallo,
so leid es mir tut, aber ich muss nochmal stören, bzw. etwas fragen. Also das Einlesen der Daten klappt jetzt einwandfrei, nur benötige ich halt nicht alle Daten, sondern in diesem Fall nur eine Höhenstufe. Diese Werte liegen jeweils an der ersten Position der jeweiligen Zeile. Nur diese Werte müssen ausgelesen werden...
Ich schicke diesmal das Skript (zumindest den relevanten Teil) mit:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
open FILE, "gzip -cdfq $data|";
my @lines = <FILE>;
close FILE;
open(XROH, ">$xroh") || die $!;
open(YROH, ">$yroh") || die $!;
for(my $i=0; $i < $#lines; $i +=2) {
print XROH $lines[$i+1];
print YROH $lines[$i];
}
close XROH;
close YROH;
open(XWERTE, ">$xwerte") || die $!;
open(YWERTE, ">$ywerte") || die $!;
my $werte_x = qx($pickdata -v -t $tmplt_x -p1-31/1- $xroh);
my @werte_x = split(/ /, $werte_x);
print XWERTE @werte_x;
my $werte_y = qx($pickdata -v -t $tmplt_y -p2-32/1- $yroh);
my @werte_y = split(/ /, $werte_y);
print YWERTE @werte_y;
close XWERTE;
close YWERTE;
# x-werte einlesen
open (R_X, "$xwerte") || die $!;
my @lines_x = <R_X>;
close R_X;
chomp(@lines_x);
foreach(@lines_x) {
push(@xwerte,split(/\t/,$_));
}
#y-werte einlesen
open(R_Y, "$ywerte") || die $!;
my @lines_y = <R_Y>;
close R_Y;
chomp (@lines_y);
foreach(@lines_y) {
push(@ywerte,split(/\t/,$_));
}
# Zusammenfügen der Werte
open(GNUPLOT_FILE, ">$gnu_file") || die $!;
select (GNUPLOT_FILE);
for(0..$#xwerte) {
print $xwerte[$_], "\t",$ywerte[$_],"\n";
}
close GNUPLOT_FILE;
}
Vielen Dank schon mal im Voraus.
MfG
Tim