Overview
Comment:Entirely rewritten
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: 3054be52412e8ab69768d87c1165334de1448f8f7ad0af50284d24b82e400d4e
User & Date: gawthrop@users.sourceforge.net on 1998-07-25 10:21:37
Other Links: branch diff | manifest | tags
Context
1998-07-25
10:43:10
No assignments of x or u if sm rep. check-in: 1086ab7408 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
10:21:37
Entirely rewritten check-in: 3054be5241 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
10:00:48
*** empty log message *** check-in: b3eb495178 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/bin/trans/def_r2m from [a8b6e17482] to [8855e20923].

9
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
50
51
52







# Copyright (c) P.J.Gawthrop 1996

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



###############################################################

#Inform user
echo Creating $1_def.m

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

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

ON BigFloat, NumVal;
PRECISION 16; %Compatible with Matlab

%Read in the definitions file
IN "$1_def.r";

OUT "$1_def.m";

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

write "function [nx,ny,nu,nz,nyz] = $1_def;;";
write "% [nx,ny,nu,nz,nv] = $1_def;;";
write "% Linearised descriptor matrices for system $1";
write "% File $1_def.m";
write "% Generated by MTT";


write "";

write "nx = ", MTTNx, ";";
write "ny = ", MTTNy, ";";
write "nu = ", MTTNu, ";";
write "nz = ", MTTNz, ";";
write "nyz = ", MTTNyz, ";";

SHUT "$1_def.m";















>
>
>








<
<

<
<
|
<
<
<
|
<
<
<
<
|
|
|
|
|
|
>
|
>
|
|
|
|
|

<

>
>
>
>
>
>
>
9
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
50
51
52
# Copyright (c) P.J.Gawthrop 1996

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.1  1998/07/25 07:10:41  peterg
## Initial revision
##
###############################################################

#Inform user
echo Creating $1_def.m

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






# Header



cat <<EOF > $1_def.m




function  [nx,ny,nu,nz,nyz] = $1_def;
% function  [nx,ny,nu,nz,nyz] = $1_def;
% System $1, representation def, language m
% File $1_def.m;
% Generated by MTT on `date`;
%
EOF

# Constants
Nx=`grep "MTTNx " <$1_def.r | awk '{print $3}' | sed 's/;//'`
Ny=`grep "MTTNy " <$1_def.r | awk '{print $3}' | sed 's/;//'`
Nu=`grep "MTTNu " <$1_def.r | awk '{print $3}' | sed 's/;//'`
Nz=`grep "MTTNz " <$1_def.r | awk '{print $3}' | sed 's/;//'`
Nyz=`grep "MTTNyz " <$1_def.r | awk '{print $3}' | sed 's/;//'`



cat<<EOF >> $1_def.m 
  nx = $Nx;
  ny = $Ny;
  nu = $Nu;
  nz = $Nz;
  nyz = $Nyz;
EOF


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