12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
# Copyright (c) P.J.Gawthrop, 1996.
###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
# Revision 1.12 1996/09/12 18:45:31 peter
# Back to rcs.
#
# Revision 1.11 1996/08/24 14:02:39 peter
# Included glabal parameter passing.
# Proper error handling.
#
|
>
>
>
|
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
# Copyright (c) P.J.Gawthrop, 1996.
###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.13 1997/06/13 12:52:18 peterg
## Removed extra ; from $PARAMS
##
# Revision 1.12 1996/09/12 18:45:31 peter
# Back to rcs.
#
# Revision 1.11 1996/08/24 14:02:39 peter
# Included glabal parameter passing.
# Proper error handling.
#
|
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
|
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
else
PARAMS=$2;
fi
# PARAMS="$PARAMS ;"
$MATRIX << EOF > sm2sr_m.log 2>mtt_error.txt
% 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
%Defaults
if exist('T')==0
T=[0:0.1:10]
end;
if exist('u0')==0
u0 = ones(nu,1);
end;
if exist('x0')==0
x0 = zeros(nx,1);
|
<
<
<
<
<
<
<
>
>
>
<
<
<
<
|
<
|
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
|
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
# PARAMS="$PARAMS ;"
$MATRIX << EOF > sm2sr_m.log 2>mtt_error.txt
% Read in the numeric system parameters
$1_numpar;
% Read in the simulation parameters
$1_simpar;
[nx,ny,nu,nz,nyz] = $1_def;
t=0; %Just in case it appears in the parameter list.
T=[0:DT:LAST]'
if exist('u0')==0
u0 = ones(nu,1);
end;
if exist('x0')==0
x0 = zeros(nx,1);
|