#!/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.3 1998/02/09 14:13:39 peterg
## Put octave stuff to /dev/null
##
## Revision 1.2 1998/02/09 08:39:27 peterg
## Set inputs to zero as well.
##
## 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","at");
[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