Gnuplot fit Daten extrahieren
21.03.2010 | Kein Kommentar »
Ein kleines Script das ich mir gerade zusammenkopiert habe (thx to Francois Boulogne)…
Nützlich isses aber, darum poste ichs mal hier…
#!/usr/bin/perl # Extracts final set of fitting parameters out of gnuplots fit.log # # Max, email: webmaster~a.t=mixed-it.de # use warnings; # what to seperate the values? $sep=", "; open(FITLOG,"fit.log") or warn "Can't open fit.log"; while(<FITLOG>) { # nach final variable suchen...regex von http://de.pastebin.ca/1804745 if ($_ =~ s/(\w+)\s+=\s(.*?)\s+\+\/\-\s+(.*?)\s+\((.*?)\%\)/$1 $2 $3 $4/) { @string = split(/ /,$_); print("$string[0]$sep$string[1]$sep$string[2]\n"); } } close(FITLOG);
Sag etwas dazu: