Artifact 940ae6900c7d5f6982c6237478d5bd7d00fdc77f7d6037cc6d8f8f64676bdeb1:


#!/bin/sh

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

# Bourne shell script: makesspar
# Makes default sspar file: all states zero.

# P.J.Gawthrop February 1998
# Copyright (c) P.J.Gawthrop, 1998.

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.1  1998/02/06 15:53:49  peterg
## Initial revision
##
###############################################################


#Inform user
echo Creating $1_sspar.r

echo "% Steady-state parameters for system $1 ($1_sspar.r)"> $1_sspar.r
echo "% Generated by MTT on" `date`. >> $1_sspar.r                  	   
cat $MTTPATH/trans/m/rcs_header.txt  >> $1_sspar.r
echo "% Set all states and inputs to zero" >> $1_sspar.r                  	   

$MATRIX  <<EOF #>> /dev/null

fnum=fopen("$1_sspar.r","a");

[nx,ny,nu,nz,nyz] = $1_def;

for i = 1:nx
  fprintf(fnum,"MTTX%i := 0;\n", i);
end;
fprintf(fnum,"\n");
for i = 1:nu
  fprintf(fnum,"MTTU%i := 0;\n", i);
end;
   
  
EOF

 
echo "END;;" >> $1_sspar.r   


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