Index: mttroot/mtt/bin/trans/sm2sr_m ================================================================== --- mttroot/mtt/bin/trans/sm2sr_m +++ mttroot/mtt/bin/trans/sm2sr_m @@ -14,10 +14,13 @@ ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ +## Revision 1.10 1996/08/19 15:34:14 peter +## Now based on state - not descriptor matrices. +## ## Revision 1.9 1996/08/18 12:01:45 peter ## Unified format of time responses. ## ## Revision 1.8 1996/08/15 16:23:39 peter ## Uses T in place of t to avoid name clash within function. @@ -49,10 +52,11 @@ echo Creating $1_sr.m echo Creating $1_sro.m rm -f sm2sr_m.log rm -f $1_sr.m rm -f $1_sro.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 @@ -60,11 +64,14 @@ PARAMS=$2; fi PARAMS="$PARAMS ;" -$MATRIX << EOF > sm2sr_m.log +$MATRIX << EOF > sm2sr_m.log 2>mtt_error + + % 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 @@ -86,11 +93,11 @@ [n,m]=size(T); if m>n T=T'; end; - [A,B,C,D] = $1_sm($1_numpar); + [A,B,C,D] = $1_sm; [y,x] = sm2sr(A,B,C,D,T,u0,x0); if nx>0 write_matrix([T x], '$1_sr'); end; @@ -98,5 +105,16 @@ write_matrix([T y], '$1_sro'); end; EOF +err_length=$(wc -c