LJ Archive

Listing 3. TFD Listing


> \cat list-ex.r | pr -t -n:2
 1:require tfd
 2:
 3:i = 1;
 4:files = "|ls *.dat";
 5:
 6:#
 7:# Read the data from each file...
 8:#
 9:
10:while(length(line = getline(files)))
11:{
12:  filenm[i] = line.[1];
13:  readb(filenm[i], $$.[filenm[i]]);
14:  i++;
15:}
16:
17:close (files);
18:
19:#
20:# Now work on each list, computing
21:# the TFD for each matrix in each list...
22:#
23:
24:for (i in filenm)
25:{
26:  for (j in members ($$.[i]))
27:  {
28:    $$.[i].[j+"y"] = tfd ($$.[i].[j]);
29:  }
30:}
31:
32: save("tfd.dat")
LJ Archive