Overview
Comment:Now encapsulates the data into an m file
Name changed
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: b6f0f8cdc57a13b3528b1880ac10dc4e49f6fef0f6f03c260bfe0d8dee9d9b77
User & Date: gawthrop@users.sourceforge.net on 1996-08-14 09:15:02
Other Links: branch diff | manifest | tags
Context
1996-08-14
09:16:08
Step response now goes through m, dat and gdat conversions check-in: 6169ce90bb user: gawthrop@users.sourceforge.net tags: origin/master, trunk
09:15:02
Now encapsulates the data into an m file
Name changed
check-in: b6f0f8cdc5 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
08:36:52
Puts a tab between columns. check-in: a1c2d5628a user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/bin/trans/sm2sr_m from [8d38ce92ce] to [16a575cf2f].

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
#! /bin/sh

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

# Bourne shell script: dm2sr

# Transforms descriptor matrix rep to step response


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

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



## Revision 1.4  1996/08/11 19:48:04  peter
## Parameter passing added.
##
## Revision 1.3  1996/08/11 10:38:30  peter
## Minor debugging changes.
##
## Revision 1.2  1996/08/11 10:06:50  peter
## Now allows e format and NaN numbers.
##
## Revision 1.1  1996/08/11 09:45:46  peter
## Initial revision
##
###############################################################

echo Creating $1_sr.dat


if [ "$2" = "" ]; 
then
  PARAMS='t=[0:0.1:10]'
  echo Using default parameter $PARAMS
else
  PARAMS=$2;
fi

PARAMS="$PARAMS ;"
echo $PARAMS

$MATRIX << EOF  | awk '$1 !~ /[A-MO-Zb-cf-z]/ && NF>0 {print} '  >$1_sr.dat

  $PARAMS
  [n,m]=size(t);
  if m>n
    t=t';
  end;

  [A,B,C,D,E] = $1_dm($1_numpar);
  y = dm2sr(A,B,C,D,E,t);

  [Ny,Nu]=size(D);
  NN = Ny*Nu;

  xy = [t y(:,1)];
  for i=2:NN
    xy = [xy t y(:,i)];
  end;

xy



EOF







|











>
>
>














|
|












|















|

>

>
>



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
#! /bin/sh

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

# Bourne shell script: dm2sr_m

# Transforms descriptor matrix rep to step response


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

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.5  1996/08/12 20:19:06  peter
## Fiddled about with parameter passing - still not right
##
## Revision 1.4  1996/08/11 19:48:04  peter
## Parameter passing added.
##
## Revision 1.3  1996/08/11 10:38:30  peter
## Minor debugging changes.
##
## Revision 1.2  1996/08/11 10:06:50  peter
## Now allows e format and NaN numbers.
##
## Revision 1.1  1996/08/11 09:45:46  peter
## Initial revision
##
###############################################################

echo Creating $1_sr.m
rm -f dm2sr_m.log

if [ "$2" = "" ]; 
then
  PARAMS='t=[0:0.1:10]'
  echo Using default parameter $PARAMS
else
  PARAMS=$2;
fi

PARAMS="$PARAMS ;"
echo $PARAMS

$MATRIX << EOF > dm2sr_m.log

  $PARAMS
  [n,m]=size(t);
  if m>n
    t=t';
  end;

  [A,B,C,D,E] = $1_dm($1_numpar);
  y = dm2sr(A,B,C,D,E,t);

  [Ny,Nu]=size(D);
  NN = Ny*Nu;

  xy = [t y(:,1)];
  for i=2:NN
    xy = [xy y(:,i)];
  end;

xy

write_matrix(xy, '$1_sr');

EOF


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