Mercurial > hg > octave-nkf
changeset 3423:12f2097a2ed8
[project @ 2000-01-13 07:04:48 by jwe]
author | jwe |
---|---|
date | Thu, 13 Jan 2000 07:07:15 +0000 |
parents | 9fc59b290856 |
children | 61e40232a4e8 |
files | scripts/control/obsolete/series.m scripts/control/obsolete/syschnames.m scripts/control/series.m scripts/control/syschnames.m |
diffstat | 4 files changed, 131 insertions(+), 131 deletions(-) [+] |
line wrap: on
line diff
new file mode 100644 --- /dev/null +++ b/scripts/control/obsolete/series.m @@ -0,0 +1,99 @@ +## Copyright (C) 1996 Auburn University. All rights reserved. +## +## This file is part of Octave. +## +## Octave is free software; you can redistribute it and/or modify it +## under the terms of the GNU General Public License as published by the +## Free Software Foundation; either version 2, or (at your option) any +## later version. +## +## Octave is distributed in the hope that it will be useful, but WITHOUT +## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +## for more details. +## +## You should have received a copy of the GNU General Public License +## along with Octave; see the file COPYING. If not, write to the Free +## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. + +## Forms the series connection of two systems. +## +## Superseded by sysmult. Do not use this routine! +## used internally in zp2ss +## +## Type of input: Transfer functions +## Command: [num,den]=series(num1,den1,num2,den2) +## Forms the series representation of the two transfer functions. +## +## Type of input: State space systems +## Command: [a,b,c,d]=series(a1,b1,c1,d1,a2,b2,c2,d2) +## Forms the series representation of the two state space system arguments. +## The series connected system will have the inputs of system 1 and the +## outputs of system 2. +## +## Type of input: system data structure +## Command: syst=series(syst1,syst2) +## Forms the series representation of the two mu system arguments. + +## Author: David Clem +## Created: August 15, 1994 + +function [a, b, c, d] = series (a1, b1, c1, d1, a2, b2, c2, d2) + + ## If two arguments input, take care of mu system case + + warning("series is superseded by sysmult; use sysmult instead.") + + muflag = 0; + if(nargin == 2) + temp=b1; + [a1,b1,c1,d1]=sys2ss(a1); + [a2,b2,c2,d2]=sys2ss(temp); + muflag = 1; + endif + + ## If four arguments input, put two transfer functions in series + + if(nargin == 4) + a = conv(a1,c1); % was conv1 + b = conv(b1,d1); % was conv1 + c = 0; + d = 0; + + ## Find series combination of 2 state space systems + + elseif((nargin == 8)||(muflag == 1)) + + ## check matrix dimensions + + [n1,m1,p1] = abcddim(a1,b1,c1,d1); + [n2,m2,p2] = abcddim(a2,b2,c2,d2); + + if((n1 == -1) || (n2 == -1)) + error("Incorrect matrix dimensions"); + endif + + ## check to make sure the number of outputs of system1 equals the number + ## of inputs of system2 + + if(p1 ~= m2) + error("System 1 output / System 2 input connection sizes do not match"); + endif + + ## put the two state space systems in series + + a = [a1, zeros(rows(a1),columns(a2));b2*c1, a2]; + b = [b1;b2*d1]; + c = [d2*c1, c2]; + d = [d2*d1]; + + ## take care of mu output + + if(muflag == 1) + a=ss2sys(a,b,c,d); + b=c=d=0; + endif + endif + +endfunction +
new file mode 100644 --- /dev/null +++ b/scripts/control/obsolete/syschnames.m @@ -0,0 +1,32 @@ +## Copyright (C) 1996, 1998 Auburn University. All rights reserved. +## +## This file is part of Octave. +## +## Octave is free software; you can redistribute it and/or modify it +## under the terms of the GNU General Public License as published by the +## Free Software Foundation; either version 2, or (at your option) any +## later version. +## +## Octave is distributed in the hope that it will be useful, but WITHOUT +## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +## for more details. +## +## You should have received a copy of the GNU General Public License +## along with Octave; see the file COPYING. If not, write to the Free +## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. + +## -*- texinfo -*- +## @deftypefn {Function File } {@var{retsys} =} syschnames (@var{sys}, @var{opt}, @var{list}, @var{names}) +## Superseded by @code{syssetsignals} +## @end deftypefn + +## Author: John Ingram <ingraje@eng.auburn.edu> +## Created: August 1996 +## updated by A. S. Hodel 1998 + +function retsys = syschnames (sys, opt, list, names) + + retsys = syssetsignals(sys,opt,names,list); + +endfunction
deleted file mode 100644 --- a/scripts/control/series.m +++ /dev/null @@ -1,99 +0,0 @@ -## Copyright (C) 1996 Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by the -## Free Software Foundation; either version 2, or (at your option) any -## later version. -## -## Octave is distributed in the hope that it will be useful, but WITHOUT -## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -## for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, write to the Free -## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. - -## Forms the series connection of two systems. -## -## Superseded by sysmult. Do not use this routine! -## used internally in zp2ss -## -## Type of input: Transfer functions -## Command: [num,den]=series(num1,den1,num2,den2) -## Forms the series representation of the two transfer functions. -## -## Type of input: State space systems -## Command: [a,b,c,d]=series(a1,b1,c1,d1,a2,b2,c2,d2) -## Forms the series representation of the two state space system arguments. -## The series connected system will have the inputs of system 1 and the -## outputs of system 2. -## -## Type of input: system data structure -## Command: syst=series(syst1,syst2) -## Forms the series representation of the two mu system arguments. - -## Author: David Clem -## Created: August 15, 1994 - -function [a, b, c, d] = series (a1, b1, c1, d1, a2, b2, c2, d2) - - ## If two arguments input, take care of mu system case - - warning("series is superseded by sysmult; use sysmult instead.") - - muflag = 0; - if(nargin == 2) - temp=b1; - [a1,b1,c1,d1]=sys2ss(a1); - [a2,b2,c2,d2]=sys2ss(temp); - muflag = 1; - endif - - ## If four arguments input, put two transfer functions in series - - if(nargin == 4) - a = conv(a1,c1); % was conv1 - b = conv(b1,d1); % was conv1 - c = 0; - d = 0; - - ## Find series combination of 2 state space systems - - elseif((nargin == 8)||(muflag == 1)) - - ## check matrix dimensions - - [n1,m1,p1] = abcddim(a1,b1,c1,d1); - [n2,m2,p2] = abcddim(a2,b2,c2,d2); - - if((n1 == -1) || (n2 == -1)) - error("Incorrect matrix dimensions"); - endif - - ## check to make sure the number of outputs of system1 equals the number - ## of inputs of system2 - - if(p1 ~= m2) - error("System 1 output / System 2 input connection sizes do not match"); - endif - - ## put the two state space systems in series - - a = [a1, zeros(rows(a1),columns(a2));b2*c1, a2]; - b = [b1;b2*d1]; - c = [d2*c1, c2]; - d = [d2*d1]; - - ## take care of mu output - - if(muflag == 1) - a=ss2sys(a,b,c,d); - b=c=d=0; - endif - endif - -endfunction -
deleted file mode 100644 --- a/scripts/control/syschnames.m +++ /dev/null @@ -1,32 +0,0 @@ -## Copyright (C) 1996, 1998 Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by the -## Free Software Foundation; either version 2, or (at your option) any -## later version. -## -## Octave is distributed in the hope that it will be useful, but WITHOUT -## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -## for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, write to the Free -## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. - -## -*- texinfo -*- -## @deftypefn {Function File } {@var{retsys} =} syschnames (@var{sys}, @var{opt}, @var{list}, @var{names}) -## Superseded by @code{syssetsignals} -## @end deftypefn - -## Author: John Ingram <ingraje@eng.auburn.edu> -## Created: August 1996 -## updated by A. S. Hodel 1998 - -function retsys = syschnames (sys, opt, list, names) - - retsys = syssetsignals(sys,opt,names,list); - -endfunction