From: <par...@us...> - 2010-08-29 11:45:53
|
Revision: 7598 http://octave.svn.sourceforge.net/octave/?rev=7598&view=rev Author: paramaniac Date: 2010-08-29 11:45:46 +0000 (Sun, 29 Aug 2010) Log Message: ----------- control: replace all ctranspose ' by transpose .' Modified Paths: -------------- trunk/octave-forge/main/control/inst/@lti/sminreal.m trunk/octave-forge/main/control/inst/@ss/__minreal__.m trunk/octave-forge/main/control/inst/__tf2ss__.m trunk/octave-forge/main/control/inst/__timeresp__.m trunk/octave-forge/main/control/inst/care.m trunk/octave-forge/main/control/inst/covar.m trunk/octave-forge/main/control/inst/dare.m trunk/octave-forge/main/control/inst/dlyap.m trunk/octave-forge/main/control/inst/gensig.m trunk/octave-forge/main/control/inst/gram.m trunk/octave-forge/main/control/inst/isdetectable.m trunk/octave-forge/main/control/inst/isobsv.m trunk/octave-forge/main/control/inst/kalman.m trunk/octave-forge/main/control/inst/lsim.m trunk/octave-forge/main/control/inst/lyap.m trunk/octave-forge/main/control/inst/obsv.m trunk/octave-forge/main/control/inst/place.m trunk/octave-forge/main/control/inst/rlocus.m Modified: trunk/octave-forge/main/control/inst/@lti/sminreal.m =================================================================== --- trunk/octave-forge/main/control/inst/@lti/sminreal.m 2010-08-29 09:35:15 UTC (rev 7597) +++ trunk/octave-forge/main/control/inst/@lti/sminreal.m 2010-08-29 11:45:46 UTC (rev 7598) @@ -37,8 +37,8 @@ [cflg, Uc] = isctrb (sys); [oflg, Uo] = isobsv (sys); - xc = find (max (abs (Uc')) != 0); - xo = find (max (abs (Uo')) != 0); + xc = find (max (abs (Uc.')) != 0); + xo = find (max (abs (Uo.')) != 0); st_idx = intersect (xc, xo); sys = __sysprune__ (sys, ":", ":", st_idx); Modified: trunk/octave-forge/main/control/inst/@ss/__minreal__.m =================================================================== --- trunk/octave-forge/main/control/inst/@ss/__minreal__.m 2010-08-29 09:35:15 UTC (rev 7597) +++ trunk/octave-forge/main/control/inst/@ss/__minreal__.m 2010-08-29 11:45:46 UTC (rev 7598) @@ -38,8 +38,8 @@ if (! cflg) if (! isempty (Uc)) - A = Uc' * A * Uc; - B = Uc' * B; + A = Uc.' * A * Uc; + B = Uc.' * B; C = C * Uc; else A = B = C = []; @@ -56,8 +56,8 @@ if (! oflg) if (! isempty (Uo)) - A = Uo' * A * Uo; - B = Uo' * B; + A = Uo.' * A * Uo; + B = Uo.' * B; C = C * Uo; else A = B = C = []; Modified: trunk/octave-forge/main/control/inst/__tf2ss__.m =================================================================== --- trunk/octave-forge/main/control/inst/__tf2ss__.m 2010-08-29 09:35:15 UTC (rev 7597) +++ trunk/octave-forge/main/control/inst/__tf2ss__.m 2010-08-29 11:45:46 UTC (rev 7598) @@ -87,8 +87,8 @@ endif ## force num, den to be row vectors - num = vec (num)'; - den = vec (den)'; + num = vec (num).'; + den = vec (den).'; nn = length (num); nd = length (den); if (nn > nd) Modified: trunk/octave-forge/main/control/inst/__timeresp__.m =================================================================== --- trunk/octave-forge/main/control/inst/__timeresp__.m 2010-08-29 09:35:15 UTC (rev 7597) +++ trunk/octave-forge/main/control/inst/__timeresp__.m 2010-08-29 11:45:46 UTC (rev 7598) @@ -58,7 +58,7 @@ p = rows (C); # number of outputs ## time vector - t = (0 : dt : tfinal)'; + t = (0 : dt : tfinal).'; l_t = length (t); switch (resptype) Modified: trunk/octave-forge/main/control/inst/care.m =================================================================== --- trunk/octave-forge/main/control/inst/care.m 2010-08-29 09:35:15 UTC (rev 7597) +++ trunk/octave-forge/main/control/inst/care.m 2010-08-29 11:45:46 UTC (rev 7598) @@ -91,8 +91,8 @@ srows, scols, brows, bcols); endif - ao = a - (b/r)*s'; - qo = q - (s/r)*s'; + ao = a - (b/r)*s.'; + qo = q - (s/r)*s.'; endif ## check stabilizability @@ -123,13 +123,13 @@ x = slsb02od (a, b, q, r, b, false, false); ## corresponding gain matrix - g = r \ (b'*x); + g = r \ (b.'*x); else ## unique stabilizing solution x = slsb02od (a, b, q, r, s, false, true); ## corresponding gain matrix - g = r \ (b'*x + s'); + g = r \ (b.'*x + s.'); endif ## closed-loop poles @@ -151,7 +151,7 @@ %! %! r = 3; %! -%! [x, l, g] = care (a, b, c'*c, r); +%! [x, l, g] = care (a, b, c.'*c, r); %! %! xe = [ 0.5895 1.8216 %! 1.8216 8.8188]; @@ -180,7 +180,7 @@ %! 0.0 %! 1.0]; %! -%! [x, l, g] = care (a, b, c'*c, d'*d); +%! [x, l, g] = care (a, b, c.'*c, d.'*d); %! %! xe = [ 1.7321 1.0000 %! 1.0000 1.7321]; Modified: trunk/octave-forge/main/control/inst/covar.m =================================================================== --- trunk/octave-forge/main/control/inst/covar.m 2010-08-29 09:35:15 UTC (rev 7597) +++ trunk/octave-forge/main/control/inst/covar.m 2010-08-29 11:45:46 UTC (rev 7598) @@ -47,11 +47,11 @@ error ("covar: system is not strictly proper"); endif - q = lyap (a, b*w*b'); - p = c*q*c'; + q = lyap (a, b*w*b.'); + p = c*q*c.'; else - q = dlyap (a, b*w*b'); - p = c*q*c' + d*w*d'; + q = dlyap (a, b*w*b.'); + p = c*q*c.' + d*w*d.'; endif endfunction Modified: trunk/octave-forge/main/control/inst/dare.m =================================================================== --- trunk/octave-forge/main/control/inst/dare.m 2010-08-29 09:35:15 UTC (rev 7597) +++ trunk/octave-forge/main/control/inst/dare.m 2010-08-29 11:45:46 UTC (rev 7598) @@ -91,8 +91,8 @@ srows, scols, brows, bcols); endif - ao = a - (b/r)*s'; - qo = q - (s/r)*s'; + ao = a - (b/r)*s.'; + qo = q - (s/r)*s.'; endif ## check stabilizability @@ -123,13 +123,13 @@ x = slsb02od (a, b, q, r, b, true, false); ## corresponding gain matrix - g = (r + b'*x*b) \ (b'*x*a); + g = (r + b.'*x*b) \ (b.'*x*a); else ## unique stabilizing solution x = slsb02od (a, b, q, r, s, true, true); ## corresponding gain matrix - g = (r + b'*x*b) \ (b'*x*a + s'); + g = (r + b.'*x*b) \ (b.'*x*a + s.'); endif ## closed-loop poles Modified: trunk/octave-forge/main/control/inst/dlyap.m =================================================================== --- trunk/octave-forge/main/control/inst/dlyap.m 2010-08-29 09:35:15 UTC (rev 7597) +++ trunk/octave-forge/main/control/inst/dlyap.m 2010-08-29 11:45:46 UTC (rev 7598) @@ -139,7 +139,7 @@ %! 24.0 32.0 8.0 %! 15.0 8.0 40.0]; %! -%! X = dlyap (A', -B); +%! X = dlyap (A.', -B); %! %! X_exp = [2.0000 1.0000 1.0000 %! 1.0000 3.0000 0.0000 Modified: trunk/octave-forge/main/control/inst/gensig.m =================================================================== --- trunk/octave-forge/main/control/inst/gensig.m 2010-08-29 09:35:15 UTC (rev 7597) +++ trunk/octave-forge/main/control/inst/gensig.m 2010-08-29 11:45:46 UTC (rev 7598) @@ -72,7 +72,7 @@ tsam = tau / 64; endif - t = (0 : tsam : tfinal)'; + t = (0 : tsam : tfinal).'; switch (lower (sigtype(1:2))) case "si" Modified: trunk/octave-forge/main/control/inst/gram.m =================================================================== --- trunk/octave-forge/main/control/inst/gram.m 2010-08-29 09:35:15 UTC (rev 7597) +++ trunk/octave-forge/main/control/inst/gram.m 2010-08-29 11:45:46 UTC (rev 7598) @@ -19,9 +19,9 @@ ## -*- texinfo -*- ## @deftypefn {Function File} {@var{W} =} gram (@var{sys}, @var{mode}) ## @deftypefnx {Function File} {@var{Wc} =} gram (@var{a}, @var{b}) -## @code{gram (@var{sys}, 'c')} returns the controllability gramian of +## @code{gram (@var{sys}, "c")} returns the controllability gramian of ## the (continuous- or discrete-time) system @var{sys}. -## @code{gram (@var{sys}, 'o')} returns the observability gramian of the +## @code{gram (@var{sys}, "o")} returns the observability gramian of the ## (continuous- or discrete-time) system @var{sys}. ## @code{gram (@var{a}, @var{b})} returns the controllability gramian ## @var{Wc} of the continuous-time system @math{dx/dt = a x + b u}; @@ -52,8 +52,8 @@ [a, b, c] = ssdata (sys); if (strcmp (argin2, "o")) - a = a'; - b = c'; + a = a.'; + b = c.'; elseif (! strcmp (argin2, "c")) print_usage (); endif @@ -71,9 +71,9 @@ endif if (isct (sys)) - W = lyap (a, b*b'); # let lyap do the error checking about dimensions + W = lyap (a, b*b.'); # let lyap do the error checking about dimensions else # discrete-time system - W = dlyap (a, b*b'); # let dlyap do the error checking about dimensions + W = dlyap (a, b*b.'); # let dlyap do the error checking about dimensions endif endfunction @@ -83,21 +83,21 @@ %! a = [-1 0 0; 1/2 -1 0; 1/2 0 -1]; %! b = [1 0; 0 -1; 0 1]; %! c = [0 0 1; 1 1 0]; ## it doesn't matter what the value of c is -%! Wc = gram (ss (a, b, c), 'c'); -%! assert (a * Wc + Wc * a' + b * b', zeros (size (a))) +%! Wc = gram (ss (a, b, c), "c"); +%! assert (a * Wc + Wc * a.' + b * b.', zeros (size (a))) %!test %! a = [-1 0 0; 1/2 -1 0; 1/2 0 -1]; %! b = [1 0; 0 -1; 0 1]; ## it doesn't matter what the value of b is %! c = [0 0 1; 1 1 0]; -%! Wo = gram (ss (a, b, c), 'o'); -%! assert (a' * Wo + Wo * a + c' * c, zeros (size (a))) +%! Wo = gram (ss (a, b, c), "o"); +%! assert (a.' * Wo + Wo * a + c.' * c, zeros (size (a))) %!test %! a = [-1 0 0; 1/2 -1 0; 1/2 0 -1]; %! b = [1 0; 0 -1; 0 1]; %! Wc = gram (a, b); -%! assert (a * Wc + Wc * a' + b * b', zeros (size (a))) +%! assert (a * Wc + Wc * a.' + b * b.', zeros (size (a))) %!test %! a = [-1 0 0; 1/2 1 0; 1/2 0 -1] / 2; @@ -105,8 +105,8 @@ %! c = [0 0 1; 1 1 0]; ## it doesn't matter what the value of c is %! d = zeros (rows (c), columns (b)); ## it doesn't matter what the value of d is %! Ts = 0.1; ## Ts != 0 -%! Wc = gram (ss (a, b, c, d, Ts), 'c'); -%! assert (a * Wc * a' - Wc + b * b', zeros (size (a)), 1e-12) +%! Wc = gram (ss (a, b, c, d, Ts), "c"); +%! assert (a * Wc * a.' - Wc + b * b.', zeros (size (a)), 1e-12) %!test %! a = [-1 0 0; 1/2 1 0; 1/2 0 -1] / 2; @@ -114,5 +114,5 @@ %! c = [0 0 1; 1 1 0]; %! d = zeros (rows (c), columns (b)); ## it doesn't matter what the value of d is %! Ts = 0.1; ## Ts != 0 -%! Wo = gram (ss (a, b, c, d, Ts), 'o'); -%! assert (a' * Wo * a - Wo + c' * c, zeros (size (a)), 1e-12) \ No newline at end of file +%! Wo = gram (ss (a, b, c, d, Ts), "o"); +%! assert (a.' * Wo * a - Wo + c.' * c, zeros (size (a)), 1e-12) \ No newline at end of file Modified: trunk/octave-forge/main/control/inst/isdetectable.m =================================================================== --- trunk/octave-forge/main/control/inst/isdetectable.m 2010-08-29 09:35:15 UTC (rev 7597) +++ trunk/octave-forge/main/control/inst/isdetectable.m 2010-08-29 11:45:46 UTC (rev 7598) @@ -57,7 +57,7 @@ endif endif - retval = isstabilizable (a', c', tol, dflg); + retval = isstabilizable (a.', c.', tol, dflg); endfunction Modified: trunk/octave-forge/main/control/inst/isobsv.m =================================================================== --- trunk/octave-forge/main/control/inst/isobsv.m 2010-08-29 09:35:15 UTC (rev 7597) +++ trunk/octave-forge/main/control/inst/isobsv.m 2010-08-29 11:45:46 UTC (rev 7598) @@ -21,7 +21,7 @@ ## @deftypefnx {Function File} {[@var{retval}, @var{u}] =} isobsv (@var{sys}, @var{tol}) ## Logical check for system observability. ## -## Default: tol = @code{tol = 10*norm(a,'fro')*eps} +## Default: tol = @code{tol = 10*norm(a,"fro")*eps} ## ## Returns 1 if the system @var{sys} or the pair (@var{a}, @var{c}) is ## observable, 0 if not. @@ -55,9 +55,9 @@ print_usage (); endif if (exist ("tol")) - [retval, U] = isctrb (a', c', tol); + [retval, U] = isctrb (a.', c.', tol); else - [retval, U] = isctrb (a', c'); + [retval, U] = isctrb (a.', c.'); endif endfunction Modified: trunk/octave-forge/main/control/inst/kalman.m =================================================================== --- trunk/octave-forge/main/control/inst/kalman.m 2010-08-29 09:35:15 UTC (rev 7597) +++ trunk/octave-forge/main/control/inst/kalman.m 2010-08-29 11:45:46 UTC (rev 7598) @@ -91,20 +91,20 @@ h = d(sensors, stoch); if (isempty (s)) - rbar = r + h*q*h'; - sbar = g * q*h'; + rbar = r + h*q*h.'; + sbar = g * q*h.'; else - rbar = r + h*s + s'*h' + h*q*h'; - sbar = g * (q*h' + s); + rbar = r + h*s + s.'*h.' + h*q*h.'; + sbar = g * (q*h.' + s); endif if (isct (sys)) - [x, l, k] = care (a', c', g*q*g', rbar, sbar); + [x, l, k] = care (a.', c.', g*q*g.', rbar, sbar); else - [x, l, k] = dare (a', c', g*q*g', rbar, sbar); + [x, l, k] = dare (a.', c.', g*q*g.', rbar, sbar); endif - k = k'; + k = k.'; est = estim (sys, k, sensors, known); Modified: trunk/octave-forge/main/control/inst/lsim.m =================================================================== --- trunk/octave-forge/main/control/inst/lsim.m 2010-08-29 09:35:15 UTC (rev 7597) +++ trunk/octave-forge/main/control/inst/lsim.m 2010-08-29 11:45:46 UTC (rev 7598) @@ -75,7 +75,7 @@ m = columns (G); # number of inputs p = rows (C); # number of outputs - t = (0 : dt : tfinal)'; # time vector + t = (0 : dt : tfinal).'; # time vector trows = length (t); if (urows != trows) @@ -101,9 +101,9 @@ ## simulation for k = 1 : trows - y(k, :) = C * x + D * u(k, :)'; + y(k, :) = C * x + D * u(k, :).'; x_arr(k, :) = x; - x = F * x + G * u(k, :)'; + x = F * x + G * u(k, :).'; endfor if (! nargout) # plot information Modified: trunk/octave-forge/main/control/inst/lyap.m =================================================================== --- trunk/octave-forge/main/control/inst/lyap.m 2010-08-29 09:35:15 UTC (rev 7597) +++ trunk/octave-forge/main/control/inst/lyap.m 2010-08-29 11:45:46 UTC (rev 7598) @@ -173,7 +173,7 @@ %! -73.0 -70.0 -25.0 %! -28.0 -25.0 -18.0]; %! -%! X = lyap (A', -B, [], E'); +%! X = lyap (A.', -B, [], E.'); %! %! X_exp = [-2.0000 -1.0000 0.0000 %! -1.0000 -3.0000 -1.0000 Modified: trunk/octave-forge/main/control/inst/obsv.m =================================================================== --- trunk/octave-forge/main/control/inst/obsv.m 2010-08-29 09:35:15 UTC (rev 7597) +++ trunk/octave-forge/main/control/inst/obsv.m 2010-08-29 11:45:46 UTC (rev 7598) @@ -40,7 +40,7 @@ print_usage (); endif - ob = ctrb (a', c')'; + ob = ctrb (a.', c.').'; endfunction Modified: trunk/octave-forge/main/control/inst/place.m =================================================================== --- trunk/octave-forge/main/control/inst/place.m 2010-08-29 09:35:15 UTC (rev 7597) +++ trunk/octave-forge/main/control/inst/place.m 2010-08-29 11:45:46 UTC (rev 7598) @@ -58,8 +58,8 @@ ## @example ## @group ## Place is also suitable to design estimator gains: -## L = place (A', C', p)' -## L = place (sys.', p)' % useful for discrete-time systems +## L = place (A.', C.', p).' +## L = place (sys.', p).' % useful for discrete-time systems ## @end group ## @end example ## @end deftypefn Modified: trunk/octave-forge/main/control/inst/rlocus.m =================================================================== --- trunk/octave-forge/main/control/inst/rlocus.m 2010-08-29 09:35:15 UTC (rev 7597) +++ trunk/octave-forge/main/control/inst/rlocus.m 2010-08-29 11:45:46 UTC (rev 7598) @@ -146,7 +146,7 @@ ngain = max (30, ngain); gvec = linspace (mink, maxk, ngain); if (length (k_break)) - gvec = sort ([gvec, vec(k_break)']); + gvec = sort ([gvec, vec(k_break).']); endif ## Find the open loop zeros and the initial poles @@ -175,7 +175,7 @@ done = (nargin == 4); # perform a smoothness check while (! done && ngain < 1000) done = 1 ; # assume done - dp = abs (diff (rlpol'))'; + dp = abs (diff (rlpol.')).'; maxdp = max (dp); ## search for poles whose neighbors are distant @@ -306,7 +306,7 @@ endif # reorder entries in each column of rlpol to be by their nearest-neighbors - dp = diff (rlpol')'; + dp = diff (rlpol.').'; drp = max (real (dp)); dip = max (imag (dp)); idx = find (drp > tolx | dip > toly); @@ -324,9 +324,9 @@ mindist = min (dval); sidx = min (find (dval == mindist)) + ii - 1; if (sidx != ii) - c1 = norm (diff(vals')); + c1 = norm (diff(vals.')); [vals(ii,2), vals(sidx,2)] = swap (vals(ii,2), vals(sidx,2)); - c2 = norm (diff (vals')); + c2 = norm (diff (vals.')); if (c1 > c2) ## perform the swap [rlpol(ii,jdx), rlpol(sidx,jdx)] = swap (rlpol(ii,jdx), rlpol(sidx,jdx)); @@ -339,9 +339,6 @@ endfunction -function [a1, b1] = swap (a, b) +function [b, a] = swap (a, b) - a1 = b; - b1 = a; - endfunction This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |