Differences From Artifact [6392ec53de]:

To Artifact [a2212317a1]:


10
11
12
13
14
15
16



17
18
19
20
21


22













23
24
25
26
27
28
29
30
31
# Copyright (c) P.J.Gawthrop 1998

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



## Revision 1.1  1998/01/22 13:16:43  peterg
## Initial revision
##
###############################################################

















# Inform user
echo Creating $1_smo.r -- NOTE this is for SISO systems only.

# Remove the old log file
rm -f sm2smo_r.log

# Use reduce to accomplish the transformation
reduce >sm2smo_r.log << EOF








>
>
>





>
>

>
>
>
>
>
>
>
>
>
>
>
>
>

|







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

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.2  1998/01/22 13:25:22  peterg
## Added END;; to output file.
##
## Revision 1.1  1998/01/22 13:16:43  peterg
## Initial revision
##
###############################################################

Nu=`mtt_getsize $1 u`
Ny=`mtt_getsize $1 y`

if [ "$Nu" = "1" ]; then
  if [ "$Ny" = "1" ]; then
    blurb=' for this siso system'    
  else
    blurb=" using first output of $Ny"
  fi
else
  if [ "$Ny" = "1" ]; then
    blurb=" using first input of $Nu"
  else
    blurb=" using first input of $Nu and using first output of $Ny"
  fi
fi
# Inform user
echo Creating $1_smo.r $blurb

# Remove the old log file
rm -f sm2smo_r.log

# Use reduce to accomplish the transformation
reduce >sm2smo_r.log << EOF

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
MTT_Matrix_n := MTTNx$
MTT_Matrix_m := MTTNx$
Reduce_Matrix()$

MTT_Matrix := MTTB_o$ 
MTT_Matrix_name := "MTTB_o"$
MTT_Matrix_n := MTTNx$
MTT_Matrix_m := MTTNu$
Reduce_Matrix()$

MTT_Matrix := MTTC_o$ 
MTT_Matrix_name := "MTTC_o"$
MTT_Matrix_n := MTTNy$
MTT_Matrix_m := MTTNx$
Reduce_Matrix()$

MTT_Matrix := MTTD_o$ 
MTT_Matrix_name := "MTTD_o"$
MTT_Matrix_n := MTTNy$
MTT_Matrix_m := MTTNu$
Reduce_Matrix()$

write "%  -Observability matrix";
MTT_Matrix := MTTObs$ 
MTT_Matrix_name := "MTTObs"$
MTT_Matrix_n := MTTNx$
MTT_Matrix_m := MTTNx$







|




|





|
|







101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
MTT_Matrix_n := MTTNx$
MTT_Matrix_m := MTTNx$
Reduce_Matrix()$

MTT_Matrix := MTTB_o$ 
MTT_Matrix_name := "MTTB_o"$
MTT_Matrix_n := MTTNx$
MTT_Matrix_m := 1$
Reduce_Matrix()$

MTT_Matrix := MTTC_o$ 
MTT_Matrix_name := "MTTC_o"$
MTT_Matrix_n := 1$
MTT_Matrix_m := MTTNx$
Reduce_Matrix()$

MTT_Matrix := MTTD_o$ 
MTT_Matrix_name := "MTTD_o"$
MTT_Matrix_n := 1$
MTT_Matrix_m := 1$
Reduce_Matrix()$

write "%  -Observability matrix";
MTT_Matrix := MTTObs$ 
MTT_Matrix_name := "MTTObs"$
MTT_Matrix_n := MTTNx$
MTT_Matrix_m := MTTNx$

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