Index: mttroot/mtt/bin/trans/sm2sr_m ================================================================== --- mttroot/mtt/bin/trans/sm2sr_m +++ mttroot/mtt/bin/trans/sm2sr_m @@ -2,11 +2,11 @@ ###################################### ##### Model Transformation Tools ##### ###################################### -# Bourne shell script: dm2sr +# Bourne shell script: dm2sr_m # Transforms descriptor matrix rep to step response # Copyright (c) P.J.Gawthrop, 1996. @@ -14,10 +14,13 @@ ############################################################### ## 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. @@ -28,12 +31,12 @@ ## Revision 1.1 1996/08/11 09:45:46 peter ## Initial revision ## ############################################################### -echo Creating $1_sr.dat - +echo Creating $1_sr.m +rm -f dm2sr_m.log if [ "$2" = "" ]; then PARAMS='t=[0:0.1:10]' echo Using default parameter $PARAMS @@ -42,11 +45,11 @@ fi PARAMS="$PARAMS ;" echo $PARAMS -$MATRIX << EOF | awk '$1 !~ /[A-MO-Zb-cf-z]/ && NF>0 {print} ' >$1_sr.dat +$MATRIX << EOF > dm2sr_m.log $PARAMS [n,m]=size(t); if m>n t=t'; @@ -58,11 +61,14 @@ [Ny,Nu]=size(D); NN = Ny*Nu; xy = [t y(:,1)]; for i=2:NN - xy = [xy t y(:,i)]; + xy = [xy y(:,i)]; end; + xy + +write_matrix(xy, '$1_sr'); EOF