11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
# Copyright (c) P.J.Gawthrop, 1996.
###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.2 1996/08/16 13:17:57 peter
## Changed default args to include nx+nz
## Fixed bug with vector outputs.
##
## Revision 1.1 1996/08/15 16:24:55 peter
## Initial revision
##
|
>
>
>
|
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
# Copyright (c) P.J.Gawthrop, 1996.
###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.3 1996/08/18 12:00:19 peter
## Unified format of responses.
##
## Revision 1.2 1996/08/16 13:17:57 peter
## Changed default args to include nx+nz
## Fixed bug with vector outputs.
##
## Revision 1.1 1996/08/15 16:24:55 peter
## Initial revision
##
|
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
else
PARAMS=$2;
fi
PARAMS="$PARAMS ;"
$MATRIX << EOF > dae2daes_m.log
[nx,ny,nu,nz,nyz] = $1_def;
t=0; %Just in case its in the parameter list
$PARAMS
%Defaults
if exist('T')==0
|
|
>
>
>
|
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
else
PARAMS=$2;
fi
PARAMS="$PARAMS ;"
$MATRIX << EOF > dae2daes_m.log 2>mtt_error
%Read the parameters
$1_numpar;
[nx,ny,nu,nz,nyz] = $1_def;
t=0; %Just in case its in the parameter list
$PARAMS
%Defaults
if exist('T')==0
|
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
|
for tt=T'
i=i+1;
y(i,:) = $1_daeo(x(i,:),tt)';
end;
write_matrix([T,y], '$1_daeso');
end;
EOF
|
>
>
>
>
>
>
>
>
>
>
>
|
|
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
|
for tt=T'
i=i+1;
y(i,:) = $1_daeo(x(i,:),tt)';
end;
write_matrix([T,y], '$1_daeso');
end;
EOF
# Test for errors and print if any
err_length=$(wc -c <mtt_error)
if [ $err_length != "0" ]
then
echo MTT has failed with the following errors '...'
cat mtt_error
exit 1
else
exit 0
fi
|