Overview
Comment:Revised to new dat format: [x y x y x y] in place of [x y y y].
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: 24e133d5ee571c7060ab6707e1b3a20e300fbc9b914e109d6678e1e202b7abae
User & Date: gawthrop@users.sourceforge.net on 1996-08-10 14:12:48.000
Other Links: branch diff | manifest | tags
Context
1996-08-10
14:13:47
Added impulse and frequency response stuff. check-in: da50dc9881 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
14:12:48
Revised to new dat format: [x y x y x y] in place of [x y y y]. check-in: 24e133d5ee user: gawthrop@users.sourceforge.net tags: origin/master, trunk
12:54:56
Reorganised data file for gnuplot input. check-in: 918f93dd9b user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes
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
# Copyright (c) P.J.Gawthrop, 1996.

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$



## Revision 1.1  1996/08/10 09:52:39  peter
## Initial revision
##
###############################################################

echo Creating $1.ps

# Convert multi-columns into gnuplot format -
# ie stack two columns vertically separated by blank lines
awk '
BEGIN{row=0; col=0}
{ 
  row++;

  x[row] = $1;
  for (col = 2; col <= NF; col++) {

    y[row,col] = $col
  }
}
END {
  cols = col-1;
  rows = row;
  for (col = 2; col <= cols; col++) {
    for (row = 1; row <= rows; row++) {
      print x[row], y[row,col]
    };
  if (col<cols) {
    printf("\n")
  }
  }
}' $1.dat > $1.gdat








>
>
>













>
|
|
>
|





|

|







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
# Copyright (c) P.J.Gawthrop, 1996.

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.2  1996/08/10 12:54:56  peter
## Reorganised data file for gnuplot input.
##
## Revision 1.1  1996/08/10 09:52:39  peter
## Initial revision
##
###############################################################

echo Creating $1.ps

# Convert multi-columns into gnuplot format -
# ie stack two columns vertically separated by blank lines
awk '
BEGIN{row=0; col=0}
{ 
  row++;
  for (col = 1; col <= NF/2; col++) {
    xcol = 2*col-1;
    ycol = 2*col;
    x[row,col] = $xcol
    y[row,col] = $ycol
  }
}
END {
  cols = col-1;
  rows = row;
  for (col = 1; col <= cols; col++) {
    for (row = 1; row <= rows; row++) {
      print x[row,col], y[row,col]
    };
  if (col<cols) {
    printf("\n")
  }
  }
}' $1.dat > $1.gdat


MTT: Model Transformation Tools
GitHub | SourceHut | Sourceforge | Fossil RSS ]