Overview
Comment:Parameterised version of sm etc.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: 78ac9c0f2f630d1271e17d1067d75be61fa0db95a3f557631a7583cc6c8ab726
User & Date: gawthrop@users.sourceforge.net on 2000-05-20 15:23:09.000
Other Links: branch diff | manifest | tags
Context
2000-05-20
15:23:56
Paramererised version of sm etc etc (using -parameter switch) check-in: 5efa96193d user: gawthrop@users.sourceforge.net tags: origin/master, trunk
15:23:09
Parameterised version of sm etc. check-in: 78ac9c0f2f user: gawthrop@users.sourceforge.net tags: origin/master, trunk
2000-05-19
19:54:50
Initial revision check-in: b864a7bf65 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes
︙︙
12
13
14
15
16
17
18



19
20
21
22
23
24
25
# Copyright (c) P.J.Gawthrop, 1996.

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



## Revision 1.15  1998/07/27 20:31:40  peterg
## New simpar version
##
## Revision 1.14  1998/07/25 10:00:48  peterg
## *** empty log message ***
##
## Revision 1.13  1997/06/13 12:52:18  peterg







>
>
>







12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Copyright (c) P.J.Gawthrop, 1996.

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.16  1998/08/11 13:31:05  peterg
## Lowercase mttLAST etc
##
## Revision 1.15  1998/07/27 20:31:40  peterg
## New simpar version
##
## Revision 1.14  1998/07/25 10:00:48  peterg
## *** empty log message ***
##
## Revision 1.13  1997/06/13 12:52:18  peterg
︙︙
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112


# PARAMS="$PARAMS ;"

$MATRIX << EOF > sm2sr_m.log 2>mtt_error.txt

  % Read in the numeric system parameters
  $1_numpar;

  % Read in the simulation parameters
  $1_simpar;

  [nx,ny,nu,nz,nyz] = $1_def;
  t=0;	%Just in case it appears in the parameter list.

  T=[0:mttdt:mttlast]'

  if exist('u0')==0
    u0 = ones(nu,1);
  end;

  if exist('x0')==0
    x0 = zeros(nx,1);
  end;


  [n,m]=size(T);
  if m>n
    T=T';
  end;

  [A,B,C,D] = $1_sm;
  [y,x] = sm2sr(A,B,C,D,T,u0,x0);

  if nx>0
    write_matrix([T x], '$1_sr');
  end;
  if ny>0
    write_matrix([T y], '$1_sro');







|


|




|















|







77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115


# PARAMS="$PARAMS ;"

$MATRIX << EOF > sm2sr_m.log 2>mtt_error.txt

  % Read in the numeric system parameters
  mttpar = $1_numpar;

  % Read in the simulation parameters
  simpar = $1_simpar;

  [nx,ny,nu,nz,nyz] = $1_def;
  t=0;	%Just in case it appears in the parameter list.

  T=[0:simpar.dt:simpar.last]'

  if exist('u0')==0
    u0 = ones(nu,1);
  end;

  if exist('x0')==0
    x0 = zeros(nx,1);
  end;


  [n,m]=size(T);
  if m>n
    T=T';
  end;

  [A,B,C,D] = $1_sm(mttpar);
  [y,x] = sm2sr(A,B,C,D,T,u0,x0);

  if nx>0
    write_matrix([T x], '$1_sr');
  end;
  if ny>0
    write_matrix([T y], '$1_sro');
︙︙

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