From: <par...@us...> - 2011-09-18 13:09:46
|
Revision: 8550 http://octave.svn.sourceforge.net/octave/?rev=8550&view=rev Author: paramaniac Date: 2011-09-18 13:09:40 +0000 (Sun, 18 Sep 2011) Log Message: ----------- control: try other than default value for tol Modified Paths: -------------- trunk/octave-forge/main/control/devel/tf2ss/sltd04ad.cc trunk/octave-forge/main/control/devel/tf2ss/test_tf2ss.m trunk/octave-forge/main/control/devel/tf2ss/tf2ss.m Modified: trunk/octave-forge/main/control/devel/tf2ss/sltd04ad.cc =================================================================== --- trunk/octave-forge/main/control/devel/tf2ss/sltd04ad.cc 2011-09-18 07:27:40 UTC (rev 8549) +++ trunk/octave-forge/main/control/devel/tf2ss/sltd04ad.cc 2011-09-18 13:09:40 UTC (rev 8550) @@ -62,7 +62,7 @@ int nargin = args.length (); octave_value_list retval; - if (nargin != 3) + if (nargin != 4) { print_usage (); } @@ -74,6 +74,7 @@ NDArray ucoeff = args(0).array_value (); Matrix dcoeff = args(1).matrix_value (); Matrix indexd = args(2).matrix_value (); + double tol = args(3).double_value (); int p = ucoeff.rows (); // p: number of outputs int m = ucoeff.columns (); // m: number of inputs @@ -102,9 +103,6 @@ Matrix c (ldc, n); Matrix d (ldd, m); - // tolerance - double tol = 0; // use default value - // workspace int ldwork = max (1, n + max (n, 3*m, 3*p)); Modified: trunk/octave-forge/main/control/devel/tf2ss/test_tf2ss.m =================================================================== --- trunk/octave-forge/main/control/devel/tf2ss/test_tf2ss.m 2011-09-18 07:27:40 UTC (rev 8549) +++ trunk/octave-forge/main/control/devel/tf2ss/test_tf2ss.m 2011-09-18 13:09:40 UTC (rev 8550) @@ -15,5 +15,5 @@ ucoeff(2,1,:) = u21; ucoeff(2,2,:) = u22; -[a, b, c, d] = sltd04ad (ucoeff, dcoeff, index) +[a, b, c, d] = sltd04ad (ucoeff, dcoeff, index, 0) Modified: trunk/octave-forge/main/control/devel/tf2ss/tf2ss.m =================================================================== --- trunk/octave-forge/main/control/devel/tf2ss/tf2ss.m 2011-09-18 07:27:40 UTC (rev 8549) +++ trunk/octave-forge/main/control/devel/tf2ss/tf2ss.m 2011-09-18 13:09:40 UTC (rev 8550) @@ -9,12 +9,14 @@ sys = tf (1, [1, 1]) sys = tf (1, conv ([1, 1, 1], [1, 4, 6, 4, 1])) -sys = tf (WestlandLynx) sys = tf () sys = tf ("s") %} +sys = tf (WestlandLynx) +tol = sqrt (eps) + [p, m] = size (sys); [num, den] = tfdata (sys); @@ -62,7 +64,7 @@ %ucoeff(2,2,:)(:).' dcoeff, index %} - [a, b, c, d] = sltd04ad (ucoeff, dcoeff, index); + [a, b, c, d] = sltd04ad (ucoeff, dcoeff, index, tol); retsys = ss (a, b, c, d); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |