Overview
Comment:Initial revision
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: a70d6f7acdfcd52cf1d04336a959a7fff145a01e7d7e88ff6697e8d2e483e7e2
User & Date: gawthrop@users.sourceforge.net on 1997-06-13 12:46:59
Other Links: branch diff | manifest | tags
Context
1997-06-13
12:50:35
Removed extra ; check-in: 0bfec29f9d user: gawthrop@users.sourceforge.net tags: origin/master, trunk
12:46:59
Initial revision check-in: a70d6f7acd user: gawthrop@users.sourceforge.net tags: origin/master, trunk
09:42:25
Auto change of () to [] check-in: 7cffaa933b user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Added mttroot/mtt/bin/trans/sm2ir_m version [31aa684b30].

















































































1
2
3
4
5
6
7
8
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
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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#! /bin/sh

     ###################################### 
     ##### Model Transformation Tools #####
     ######################################

# Bourne shell script: sm2ir_m

# Transforms descriptor matrix rep to step response


# Copyright (c) P.J.Gawthrop, 1996.


echo Creating $1_ir.m
echo Creating $1_iro.m
rm -f sm2ir_m.log
rm -f $1_ir.m
rm -f $1_iro.m
rm -f mtt_error

if [ "$2" = "" ]; 
then
  PARAMS='T=[0:0.1:10];u0=ones(nu,1);x0=zeros(nx,1);'
  echo Using default parameter $PARAMS
else
  PARAMS=$2
fi

PARAMS="$PARAMS ;"

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

  % Read in the numeric system parameters
  $1_numpar;

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

  $PARAMS

  %Defaults
  if exist('T')==0
    T=[0:0.1:10]
  end;

  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] = sm2ir(A,B,C,D,T,u0,x0);

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

EOF

# Write info
touch mtt_info.txt
cat mtt_info.txt

# Now invoke the standard error handling.
mtt_error mtt_error.txt



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