Differences From Artifact [cf07863f39]:

To Artifact [eff748b620]:


10
11
12
13
14
15
16



17
18
19
20
21
22
23
# Copyright (c) P.J.Gawthrop, 1989, 1990, 1991, 1993, 1994, 1996.

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



## Revision 1.2  1996/08/19 16:25:18  peter
## Fixed bug when Nx=0.
##
## Revision 1.1  1996/08/19 15:14:51  peter
## Initial revision
##
###############################################################







>
>
>







10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# Copyright (c) P.J.Gawthrop, 1989, 1990, 1991, 1993, 1994, 1996.

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.3  1996/08/19 18:38:43  peter
## Read in the numerical params etc ...
##
## Revision 1.2  1996/08/19 16:25:18  peter
## Fixed bug when Nx=0.
##
## Revision 1.1  1996/08/19 15:14:51  peter
## Initial revision
##
###############################################################
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
MTTNVar := 0;

%Read in the parameter file
IN "$1_sympar.r";


OUT "$1_sm.m";

%Headings - Matlab style
%(Note. The ;; are deleted by for2mat)

IF MTTNvar>0 THEN
BEGIN
  write "function [MTTA,MTTB,MTTC,MTTD] = $1_sm(...";
  FOR i := 1:MTTNvar DO
  BEGIN
     IF i<MTTNvar THEN write MTTVar(i,1), ",..."
                  ELSE write MTTVar(i,1), ");;";
  END;
END
ELSE write "function [MTTA,MTTB,MTTC,MTTD] = $1_sm;;";


IF MTTNvar>0 THEN
BEGIN
  write "%function [MTTA,MTTB,MTTC,MTTD] = $1_sm(...";
  FOR i := 1:MTTNvar DO
  BEGIN
     IF i<MTTNvar THEN write "%", MTTVar(i,1), ",..."
                  ELSE write "%", MTTVar(i,1), ");;";
  END;
END
ELSE write "%function [MTTA,MTTB,MTTC,MTTD] = $1_sm;;";


write "%Linearised state matrices for system $1";
write "%File $1_sm.m";
write "%Generated by MTT";
IF MTTNvar>0 THEN
BEGIN
  write "% Read in the parameters";
  write "[ ...;;";
  FOR i := 1:MTTNvar DO
  BEGIN
     IF i<MTTNvar THEN write MTTVar(i,1), ",..."
                  ELSE write MTTVar(i,1), "] = $1_numpar"
  END;
  write "% Read in the arguments";
  write "$1_args";
END;


%Fortran switches - one line expressions
OFF echo;
ON fort$
cardno!* := 1$







<



<
<
|
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<






|
|


|
|

<
<







45
46
47
48
49
50
51

52
53
54


55











56








57
58
59
60
61
62
63
64
65
66
67
68
69


70
71
72
73
74
75
76
MTTNVar := 0;

%Read in the parameter file
IN "$1_sympar.r";


OUT "$1_sm.m";

%Headings - Matlab style
%(Note. The ;; are deleted by for2mat)



write "function [MTTA,MTTB,MTTC,MTTD] = $1_sm;;";











write "%function [MTTA,MTTB,MTTC,MTTD] = $1_sm;;";









write "%Linearised state matrices for system $1";
write "%File $1_sm.m";
write "%Generated by MTT";
IF MTTNvar>0 THEN
BEGIN
  write "% Set the parameters";
  write "global ...;;";
  FOR i := 1:MTTNvar DO
  BEGIN
     IF i<MTTNvar THEN write MTTVar(i,1), "..."
                  ELSE write MTTVar(i,1), ";"
  END;


END;


%Fortran switches - one line expressions
OFF echo;
ON fort$
cardno!* := 1$

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