8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
# Copyright (C) 2000 by Peter J. Gawthrop
###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.53 2002/06/10 23:22:16 geraint
## Fixed problem with Matlab fsolve failing because of "user function returned Inf or Nan" (fsolve.m, line 245).
##
## Revision 1.52 2002/05/27 14:52:15 geraint
## Parameters in sfun reps are now declared using sympar.h at the top of the
## sfun*.c file instead of in individual functions. This causes the optimisation
## variables (mtt_tmp*) to be declared correctly without causing conflicts in the
|
>
>
>
|
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
# Copyright (C) 2000 by Peter J. Gawthrop
###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.54 2002/07/11 13:00:23 geraint
## Declared more function arguments to be "const" - improves compiler optimisation.
##
## Revision 1.53 2002/06/10 23:22:16 geraint
## Fixed problem with Matlab fsolve failing because of "user function returned Inf or Nan" (fsolve.m, line 245).
##
## Revision 1.52 2002/05/27 14:52:15 geraint
## Parameters in sfun reps are now declared using sympar.h at the top of the
## sfun*.c file instead of in individual functions. This causes the optimisation
## variables (mtt_tmp*) to be declared correctly without causing conflicts in the
|
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
|
if [ "$rep" = "simpar" ]; then
output=${output}${map} # Output is simpar_map in this case
fi
get_sizes()
{
Nx=`mtt_getsize $system x` # States
Nxx=`mtt_getsize $system xx` # States x States
Nu=`mtt_getsize $system u` # Inputs
Ny=`mtt_getsize $system y` # Outputs
Nyz=`mtt_getsize $system yz` # Zero outputs
##Npar=`wc -l $system\_sympar.txt | gawk '{print $1}'`
}
zero_matrices()
{
## Set matrices to zero
echo
|
>
>
>
>
>
>
>
>
>
|
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
|
if [ "$rep" = "simpar" ]; then
output=${output}${map} # Output is simpar_map in this case
fi
get_sizes()
{
Nx=`mtt_getsize $system x` # States
Nz=`mtt_getsize $system z` # Non-states
Nxx=`mtt_getsize $system xx` # States x States
Nu=`mtt_getsize $system u` # Inputs
Ny=`mtt_getsize $system y` # Outputs
Nyz=`mtt_getsize $system yz` # Zero outputs
case ${rep} in
dm)
let Nx=Nx+2*Nz+Nyz # Matrices not usual size
;;
*)
esac
##Npar=`wc -l $system\_sympar.txt | gawk '{print $1}'`
}
zero_matrices()
{
## Set matrices to zero
echo
|