Changed the Makefile for gmake.
[kokare.git] / octave / td2m
CommitLineData
b7b0844d
FT
1#!/usr/bin/perl -w
2
3while(<>) {
4 if(/^(\d+)\s+([\d.]+)(-([\d.]+))?$/) {
5 if(defined($4)) {
6 $temp{$1} = ($2 + $4) / 2;
7 } else {
8 $temp{$1} = $2;
9 }
10 }
11}
12
13print "#name: ct\n";
14print "#type: matrix\n";
15print "#rows: 1\n";
16print ("#columns: " . scalar(keys %temp) . "\n");
17for $k (sort keys %temp) {
18 print " $k";
19}
20print "\n";
21
22print "#name: cd\n";
23print "#type: matrix\n";
24print "#rows: 1\n";
25print ("#columns: " . scalar(keys %temp) . "\n");
26for $k (sort keys %temp) {
27 print " $temp{$k}";
28}
29print "\n";