Overview
Comment:Parameter passing added.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: 1f88275ca2b136ca5d8ae86f7ae4c1e351a74b848213a3cbd3ba99a5a65c8c57
User & Date: gawthrop@users.sourceforge.net on 1996-08-11 19:48:29
Other Links: branch diff | manifest | tags
Context
1996-08-11
19:49:27
Parameter passing (via $4) added. check-in: bf28d3a1de user: gawthrop@users.sourceforge.net tags: origin/master, trunk
19:48:29
Parameter passing added. check-in: 1f88275ca2 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
19:47:37
Changed 'exp' to 'expm' whoops! check-in: aa391be669 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/bin/trans/dm2ir_m2dat from [25a844b55b] to [acb379d922].

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

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



## Revision 1.1  1996/08/10 14:15:03  peter
## Initial revision
##
###############################################################

echo Creating $1_ir.dat










$MATRIX << EOF | awk '$1 !~ /[A-MO-Zb-cf-z]/ && NF>0 {print} '  >$1_ir.dat




  tmax=2; tstep=tmax/100;

  T = [0:tstep:tmax]';
  [A,B,C,D,E] = $1_dm($1_numpar);
  y = dm2ir(A,B,C,D,E,T);

  [Ny,Nu]=size(D);
  NN = Ny*Nu;

  xy = [T y(:,1)];
  for i=2:NN
    xy = [xy T y(:,i)];
  end;
xy

EOF








>
>
>






>
>
>
>
>
>
>
>
>



>
>
>
|
>
|

|




|

|





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
54
55
56
57
58
59
# Copyright (c) P.J.Gawthrop, 1996.

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.2  1996/08/11 10:40:00  peter
## Now handles e and NaN numbers.
##
## Revision 1.1  1996/08/10 14:15:03  peter
## Initial revision
##
###############################################################

echo Creating $1_ir.dat

if [ "$2" = "" ]; 
then
  PARAMS='t=[0:0.1:10]'
  echo Using default parameter $PARAMS
else
  PARAMS=$2;
fi


$MATRIX << EOF | awk '$1 !~ /[A-MO-Zb-cf-z]/ && NF>0 {print} '  >$1_ir.dat

  $PARAMS;
  [n,m]=size(t);
  if m>n
    t=t';
  end;

  [A,B,C,D,E] = $1_dm($1_numpar);
  y = dm2ir(A,B,C,D,E,t);

  [Ny,Nu]=size(D);
  NN = Ny*Nu;

  xy = [t y(:,1)];
  for i=2:NN
    xy = [xy t y(:,i)];
  end;
xy

EOF

Modified mttroot/mtt/bin/trans/sm2sr_m from [543b4ed5a4] to [3179a86b5f].

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

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



## Revision 1.2  1996/08/11 10:06:50  peter
## Now allows e format and NaN numbers.
##
## Revision 1.1  1996/08/11 09:45:46  peter
## Initial revision
##
###############################################################

echo Creating $1_sr.dat











$MATRIX << EOF  | awk '$1 !~ /[A-MO-Zb-cf-z]/ && NF>0 {print} '  >$1_sr.dat






  tmax=10.0; tstep=tmax/100;
  T = [0:tstep:tmax]';
  [A,B,C,D,E] = $1_dm($1_numpar);
  y = dm2sr(A,B,C,D,E,T);

  [Ny,Nu]=size(D);
  NN = Ny*Nu;

  xy = [T y(:,1)];
  for i=2:NN
    xy = [xy T y(:,i)];
  end;
xy

EOF








>
>
>









>
>
>
>
>
>
>
>
>
>



>
>
>
>
>
|
|

|




|

|





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
54
55
56
57
58
59
60
61
62
63
64
# Copyright (c) P.J.Gawthrop, 1996.

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.3  1996/08/11 10:38:30  peter
## Minor debugging changes.
##
## Revision 1.2  1996/08/11 10:06:50  peter
## Now allows e format and NaN numbers.
##
## Revision 1.1  1996/08/11 09:45:46  peter
## Initial revision
##
###############################################################

echo Creating $1_sr.dat


if [ "$2" = "" ]; 
then
  PARAMS='t=[0:0.1:10]'
  echo Using default parameter $PARAMS
else
  PARAMS=$2;
fi


$MATRIX << EOF  | awk '$1 !~ /[A-MO-Zb-cf-z]/ && NF>0 {print} '  >$1_sr.dat

  $PARAMS;
  [n,m]=size(t);
  if m>n
    t=t';
  end;


  [A,B,C,D,E] = $1_dm($1_numpar);
  y = dm2sr(A,B,C,D,E,t);

  [Ny,Nu]=size(D);
  NN = Ny*Nu;

  xy = [t y(:,1)];
  for i=2:NN
    xy = [xy t y(:,i)];
  end;
xy

EOF


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