17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
begin="BEGIN{$sys_rep}"
# Inform user
echo "Creating $1_$2.pas"
# Find system constants
Nx=`mtt_getsize $1 x`
Nu=`mtt_getsize $1 u`
Ny=`mtt_getsize $1 y`
Npar=`wc -l $1_sympar.txt | awk '{print $1}'`
echo "PROCEDURE $1_$2;" > $1_$2.pas
echo "TYPE" >>$1_$2.pas
echo " StateVector = ARRAY[1..$Nx] OF REAL;" >>$1_$2.pas
echo " StateMatrix = ARRAY[1..$Nx,1..$Nx] OF REAL;" >>$1_$2.pas
echo " InputVector = ARRAY[1..$Nu] OF REAL;" >>$1_$2.pas
echo " OutputVector = ARRAY[1..$Ny] OF REAL;" >>$1_$2.pas
echo " ParameterVector = ARRAY[1..$Npar] OF REAL;" >>$1_$2.pas
# Create the predefined vars
echo "VAR" >>$1_$2.pas
|
>
>
|
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
|
begin="BEGIN{$sys_rep}"
# Inform user
echo "Creating $1_$2.pas"
# Find system constants
Nx=`mtt_getsize $1 x`
Nxx=`mtt_getsize $1 xx`
Nu=`mtt_getsize $1 u`
Ny=`mtt_getsize $1 y`
Npar=`wc -l $1_sympar.txt | awk '{print $1}'`
echo "PROCEDURE $1_$2;" > $1_$2.pas
echo "TYPE" >>$1_$2.pas
echo " StateVector = ARRAY[1..$Nx] OF REAL;" >>$1_$2.pas
echo " StateMatrix = ARRAY[1..$Nx,1..$Nx] OF REAL;" >>$1_$2.pas
echo " StateMatrixVector = ARRAY[1..$Nxx] OF REAL;" >>$1_$2.pas
echo " InputVector = ARRAY[1..$Nu] OF REAL;" >>$1_$2.pas
echo " OutputVector = ARRAY[1..$Ny] OF REAL;" >>$1_$2.pas
echo " ParameterVector = ARRAY[1..$Npar] OF REAL;" >>$1_$2.pas
# Create the predefined vars
echo "VAR" >>$1_$2.pas
|