diff options
author | Erich Eckner <git@eckner.net> | 2016-12-21 14:15:04 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2016-12-21 14:15:04 +0100 |
commit | b2707a93a480f4e79deb85b15980329ae1e7ffdd (patch) | |
tree | 8af0d8cdd37409a22bf0eb0f4687a05baab1cb11 /valuesunit.pas | |
parent | 5f56c12e4911968c1c18871ba0762c1db34b8438 (diff) | |
download | Analyzer-b2707a93a480f4e79deb85b15980329ae1e7ffdd.tar.xz |
Diffstat (limited to 'valuesunit.pas')
-rw-r--r-- | valuesunit.pas | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/valuesunit.pas b/valuesunit.pas index a571955..0d0a28e 100644 --- a/valuesunit.pas +++ b/valuesunit.pas @@ -25,6 +25,7 @@ type function count: int64; function timeInterval: tInt64Point; procedure intersect(v: tValues); + procedure writeCombined(v: tValues; dat: string); end; function interpolate(w1,w2: tWert; x: extended): tWert; inline; @@ -204,6 +205,30 @@ begin v.intersect(self); end; +procedure tValues.writeCombined(v: tValues; dat: string); +var + i: int64; + f: textfile; +begin + if timeInterval <> v.timeInterval then + raise exception.create('Unequal time intervals - can''t writeCombined.'); + if count <> v.count then + raise exception.create('Unequal number of values - can''t writeCombined.'); + assignFile(f,dat); + rewrite(f); + for i:=0 to count-1 do + writeln(f, + intToStr(werte[i].time) + +#9+floatToStr(werte[i].vec['x']) + +#9+floatToStr(werte[i].vec['y']) + +#9+floatToStr(werte[i].vec['z']) + +#9+floatToStr(v.werte[i].vec['x']) + +#9+floatToStr(v.werte[i].vec['y']) + +#9+floatToStr(v.werte[i].vec['z']) + ); + closefile(f); +end; + // general functions *********************************************************** function interpolate(w1,w2: tWert; x: extended): tWert; inline; |