comparison scripts/control/obsolete/dlqg.m @ 4030:22bd65326ec1

[project @ 2002-08-09 18:58:13 by jwe]
author jwe
date Fri, 09 Aug 2002 19:00:16 +0000
parents e098ebb77023
children b8105302cfe8
comparison
equal deleted inserted replaced
4029:2cc57b6169cf 4030:22bd65326ec1
52 52
53 if (nargin == 5) 53 if (nargin == 5)
54 ## system data structure format 54 ## system data structure format
55 55
56 ## check that it really is system data structure 56 ## check that it really is system data structure
57 if(! is_struct(A) ) 57 if(! isstruct(A) )
58 error("dlqg: 5 arguments, first argument is not a system data structure structure") 58 error("dlqg: 5 arguments, first argument is not a system data structure structure")
59 endif 59 endif
60 60
61 sys = sysupdate(sys,"ss"); # make sure in proper form 61 sys = sysupdate(sys,"ss"); # make sure in proper form
62 [ncstates,ndstates,nin,nout] = sysdimensions(sys); 62 [ncstates,ndstates,nin,nout] = sysdimensions(sys);
104 endif 104 endif
105 else 105 else
106 error ("dlqg: invalid number of arguments") 106 error ("dlqg: invalid number of arguments")
107 endif 107 endif
108 108
109 if (! (is_square(Sigw) && is_square(Sigv) ) ) 109 if (! (issquare(Sigw) && issquare(Sigv) ) )
110 error("dlqg: Sigw, Sigv must be square"); 110 error("dlqg: Sigw, Sigv must be square");
111 endif 111 endif
112 112
113 ## now we can just do the design; call dlqr and dlqe, since all matrices 113 ## now we can just do the design; call dlqr and dlqe, since all matrices
114 ## are not given in Cholesky factor form (as in h2syn case) 114 ## are not given in Cholesky factor form (as in h2syn case)