From: <sla...@us...> - 2009-11-21 02:26:15
|
Revision: 6497 http://octave.svn.sourceforge.net/octave/?rev=6497&view=rev Author: slackydeb Date: 2009-11-21 02:26:05 +0000 (Sat, 21 Nov 2009) Log Message: ----------- control-oo: sync 'ctrb' with (legacy) control. Modified Paths: -------------- trunk/octave-forge/extra/control-oo/inst/control/ctrb.m Modified: trunk/octave-forge/extra/control-oo/inst/control/ctrb.m =================================================================== --- trunk/octave-forge/extra/control-oo/inst/control/ctrb.m 2009-11-21 02:23:30 UTC (rev 6496) +++ trunk/octave-forge/extra/control-oo/inst/control/ctrb.m 2009-11-21 02:26:05 UTC (rev 6497) @@ -1,3 +1,4 @@ +## Copyright (C) 1997, 2000, 2002, 2004, 2005, 2006, 2007 Kai P. Mueller ## Copyright (C) 2009 Lukas F. Reichlin ## ## This file is part of LTI Syncope. @@ -21,16 +22,18 @@ ## Controllability matrix. ## @end deftypefn -## Author: Lukas Reichlin <luk...@gm...> -## Created: October 2009 -## Version: 0.1 +## Author: Kai P. Mueller <mu...@if...> +## Created: November 4, 1997 +## based on is_controllable.m of Scottedward Hodel -function co = ctrb (a, b) +function co = ctrb (sys_or_a, b) if (nargin == 1) - [a, b] = ssdata (a); + [a, b] = ssdata (sys_or_a); elseif (nargin == 2) - if (! isnumeric (a) || ! isnumeric (b) || rows(a) != rows (b) || ! issquare (a)) + a = sys_or_a; + if (! isnumeric (a) || ! isnumeric (b) || + rows(a) != rows (b) || ! issquare (a)) error ("ctrb: invalid arguments"); endif else This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |