From: <par...@us...> - 2010-09-15 01:46:52
|
Revision: 7725 http://octave.svn.sourceforge.net/octave/?rev=7725&view=rev Author: paramaniac Date: 2010-09-15 01:46:45 +0000 (Wed, 15 Sep 2010) Log Message: ----------- control: try sticking to GNU coding standards, improve efficiency Modified Paths: -------------- trunk/octave-forge/main/control/inst/@lti/set.m trunk/octave-forge/main/control/inst/@ss/__set__.m trunk/octave-forge/main/control/inst/@ss/display.m trunk/octave-forge/main/control/inst/@ss/ss.m trunk/octave-forge/main/control/inst/@tf/display.m trunk/octave-forge/main/control/inst/__time_response__.m trunk/octave-forge/main/control/inst/bode.m trunk/octave-forge/main/control/inst/bodemag.m trunk/octave-forge/main/control/inst/lsim.m trunk/octave-forge/main/control/inst/margin.m trunk/octave-forge/main/control/inst/nichols.m trunk/octave-forge/main/control/inst/nyquist.m trunk/octave-forge/main/control/inst/rlocus.m trunk/octave-forge/main/control/inst/sigma.m Added Paths: ----------- trunk/octave-forge/main/control/inst/@lti/__lti_data__.m trunk/octave-forge/main/control/inst/__axis_limits__.m trunk/octave-forge/main/control/inst/__check_name_numel__.m trunk/octave-forge/main/control/inst/__mark_empty_names__.m Removed Paths: ------------- trunk/octave-forge/main/control/inst/__axis2dlim__.m trunk/octave-forge/main/control/inst/__checkname__.m trunk/octave-forge/main/control/inst/__markemptynames__.m Added: trunk/octave-forge/main/control/inst/@lti/__lti_data__.m =================================================================== --- trunk/octave-forge/main/control/inst/@lti/__lti_data__.m (rev 0) +++ trunk/octave-forge/main/control/inst/@lti/__lti_data__.m 2010-09-15 01:46:45 UTC (rev 7725) @@ -0,0 +1,31 @@ +## Copyright (C) 2010 Lukas F. Reichlin +## +## This file is part of LTI Syncope. +## +## LTI Syncope 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 3 of the License, or +## (at your option) any later version. +## +## LTI Syncope 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 this program. If not, see <http://www.gnu.org/licenses/>. + +## -*- texinfo -*- +## Used by display routines instead of multiple get calls. + +## Author: Lukas Reichlin <luk...@gm...> +## Created: September 2010 +## Version: 0.1 + +function [inname, outname, tsam] = __lti_data__ (sys) + + inname = sys.inname; + outname = sys.outname; + tsam = sys.tsam; + +endfunction \ No newline at end of file Modified: trunk/octave-forge/main/control/inst/@lti/set.m =================================================================== --- trunk/octave-forge/main/control/inst/@lti/set.m 2010-09-15 00:52:51 UTC (rev 7724) +++ trunk/octave-forge/main/control/inst/@lti/set.m 2010-09-15 01:46:45 UTC (rev 7725) @@ -60,10 +60,10 @@ switch (prop) case {"inname", "inputname"} - sys.inname = __checkname__ (val, m); + sys.inname = __check_name_numel__ (val, m); case {"outname", "outputname"} - sys.outname = __checkname__ (val, p); + sys.outname = __check_name_numel__ (val, p); case {"tsam", "ts"} if (issample (val)) Modified: trunk/octave-forge/main/control/inst/@ss/__set__.m =================================================================== --- trunk/octave-forge/main/control/inst/@ss/__set__.m 2010-09-15 00:52:51 UTC (rev 7724) +++ trunk/octave-forge/main/control/inst/@ss/__set__.m 2010-09-15 01:46:45 UTC (rev 7725) @@ -43,7 +43,7 @@ case {"stname", "statename"} n = rows (sys.a); - sys.stname = __checkname__ (val, n); + sys.stname = __check_name_numel__ (val, n); otherwise error ("ss: set: invalid property name"); Modified: trunk/octave-forge/main/control/inst/@ss/display.m =================================================================== --- trunk/octave-forge/main/control/inst/@ss/display.m 2010-09-15 00:52:51 UTC (rev 7724) +++ trunk/octave-forge/main/control/inst/@ss/display.m 2010-09-15 01:46:45 UTC (rev 7725) @@ -1,4 +1,4 @@ -## Copyright (C) 2009 Lukas F. Reichlin +## Copyright (C) 2009 - 2010 Lukas F. Reichlin ## ## This file is part of LTI Syncope. ## @@ -20,42 +20,44 @@ ## Author: Lukas Reichlin <luk...@gm...> ## Created: September 2009 -## Version: 0.1 +## Version: 0.2 function display (sys) - tsam = get (sys, "tsam"); - inname = get (sys, "inname"); - outname = get (sys, "outname"); + [inname, outname, tsam] = __lti_data__ (sys.lti); stname = sys.stname; - if (isempty (inname) || isequal ("", inname{:})) - inname = strseq ("u", 1 : length (inname)); + m = numel (inname); + p = numel (outname); + n = numel (stname); + + if (m == 0 || isequal ("", inname{:})) + inname = strseq ("u", 1:m); else - inname = __markemptynames__ (inname); + inname = __mark_empty_names__ (inname); endif - if (isempty (outname) || isequal ("", outname{:})) - outname = strseq ("y", 1 : length (outname)); + if (p == 0 || isequal ("", outname{:})) + outname = strseq ("y", 1:p); else - outname = __markemptynames__ (outname); + outname = __mark_empty_names__ (outname); endif - if (isempty (stname) || isequal ("", stname{:})) - stname = strseq ("x", 1 : length (stname)); + if (n == 0 || isequal ("", stname{:})) + stname = strseq ("x", 1:n); else - stname = __markemptynames__ (stname); + stname = __mark_empty_names__ (stname); endif disp (""); if (! isempty (sys.a)) - dispmat (sys.a, [inputname(1), ".a"], stname, stname); - dispmat (sys.b, [inputname(1), ".b"], stname, inname); - dispmat (sys.c, [inputname(1), ".c"], outname, stname); + __disp_mat__ (sys.a, [inputname(1), ".a"], stname, stname); + __disp_mat__ (sys.b, [inputname(1), ".b"], stname, inname); + __disp_mat__ (sys.c, [inputname(1), ".c"], outname, stname); endif - dispmat (sys.d, [inputname(1), ".d"], outname, inname); + __disp_mat__ (sys.d, [inputname(1), ".d"], outname, inname); display (sys.lti); # display sampling time @@ -70,7 +72,7 @@ endfunction -function dispmat (m, mname, rname, cname) +function __disp_mat__ (m, mname, rname, cname) MAX_LEN = 12; # max length of row name and column name [mrows, mcols] = size (m); Modified: trunk/octave-forge/main/control/inst/@ss/ss.m =================================================================== --- trunk/octave-forge/main/control/inst/@ss/ss.m 2010-09-15 00:52:51 UTC (rev 7724) +++ trunk/octave-forge/main/control/inst/@ss/ss.m 2010-09-15 01:46:45 UTC (rev 7725) @@ -89,11 +89,11 @@ tsam = 0; case 4 # continuous system ss (a, b, c, d), ss ([], [], [], d) - [b, c] = __gaincheck__ (b, c, d); + [b, c] = __gain_check__ (b, c, d); tsam = 0; otherwise # default case - [b, c] = __gaincheck__ (b, c, d); + [b, c] = __gain_check__ (b, c, d); argc = numel (varargin); if (issample (varargin{1}, 1)) # sys = ss (a, b, c, d, tsam, "prop1, "val1", ...) @@ -132,7 +132,7 @@ endfunction -function [b, c] = __gaincheck__ (b, c, d) +function [b, c] = __gain_check__ (b, c, d) ## catch the case sys = ss ([], [], [], d) ## don't forget to set tsam = -1 Modified: trunk/octave-forge/main/control/inst/@tf/display.m =================================================================== --- trunk/octave-forge/main/control/inst/@tf/display.m 2010-09-15 00:52:51 UTC (rev 7724) +++ trunk/octave-forge/main/control/inst/@tf/display.m 2010-09-15 01:46:45 UTC (rev 7725) @@ -1,4 +1,4 @@ -## Copyright (C) 2009 Lukas F. Reichlin +## Copyright (C) 2009 - 2010 Lukas F. Reichlin ## ## This file is part of LTI Syncope. ## @@ -20,32 +20,33 @@ ## Author: Lukas Reichlin <luk...@gm...> ## Created: September 2009 -## Version: 0.1 +## Version: 0.2 function display (sys) - [ny, nu] = size (sys); - inname = get (sys, "inname"); - outname = get (sys, "outname"); + [inname, outname] = __lti_data__ (sys.lti); - if (isempty (inname) || isequal ("", inname{:})) - inname = strseq ("u", 1 : length (inname)); + m = numel (inname); + p = numel (outname); + + if (m == 0 || isequal ("", inname{:})) + inname = strseq ("u", 1:m); else - inname = __markemptynames__ (inname); + inname = __mark_empty_names__ (inname); endif - if (isempty (outname) || isequal ("", outname{:})) - outname = strseq ("y", 1 : length (outname)); + if (p == 0 || isequal ("", outname{:})) + outname = strseq ("y", 1:p); else - outname = __markemptynames__ (outname); + outname = __mark_empty_names__ (outname); endif disp (""); - for m = 1 : nu - disp (["Transfer function \"", inputname(1), "\" from input \"", inname{m}, "\" to output ..."]); - for p = 1 : ny - dispfrac (sys.num{p, m}, sys.den{p, m}, sys.tfvar, outname{p}); + for nu = 1 : m + disp (["Transfer function \"", inputname(1), "\" from input \"", inname{nu}, "\" to output ..."]); + for ny = 1 : p + __disp_frac__ (sys.num{ny, nu}, sys.den{ny, nu}, sys.tfvar, outname{ny}); endfor endfor @@ -54,7 +55,7 @@ endfunction -function dispfrac (num, den, tfvar, name) +function __disp_frac__ (num, den, tfvar, name) MAX_LEN = 12; # max length of output name Deleted: trunk/octave-forge/main/control/inst/__axis2dlim__.m =================================================================== --- trunk/octave-forge/main/control/inst/__axis2dlim__.m 2010-09-15 00:52:51 UTC (rev 7724) +++ trunk/octave-forge/main/control/inst/__axis2dlim__.m 2010-09-15 01:46:45 UTC (rev 7725) @@ -1,71 +0,0 @@ -## Copyright (C) 1998, 2000, 2004, 2005, 2007 -## Auburn University. All rights reserved. -## -## -## This program 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 3 of the License, or (at -## your option) any later version. -## -## This program 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 this program; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} __axis2dlim__ (@var{axdata}) -## Determine axis limits for 2-D data (column vectors); leaves a 10% -## margin around the plots. -## Inserts margins of +/- 0.1 if data is one-dimensional -## (or a single point). -## -## @strong{Input} -## @table @var -## @item axdata -## @var{n} by 2 matrix of data [@var{x}, @var{y}]. -## @end table -## -## @strong{Output} -## @table @var -## @item axvec -## Vector of axis limits appropriate for call to @command{axis} function. -## @end table -## @end deftypefn - -function axvec = __axis2dlim__ (axdata) - - if (nargin < 1 || isempty (axdata)) - axdata = 0; - endif - - ## compute axis limits - minv = min (axdata); - maxv = max (axdata); - delv = (maxv-minv)/2; # breadth of the plot - midv = (minv + maxv)/2; # midpoint of the plot - axmid = [midv(1), midv(1), midv(2), midv(2)]; - axdel = [-0.1, 0.1, -0.1, 0.1]; # default plot width (if less than 2-d data) - if (max (delv) == 0) - if (midv(1) != 0) - axdel(1:2) = [-0.1*midv(1), 0.1*midv(1)]; - endif - if (midv(2) != 0) - axdel(3:4) = [-0.1*midv(2), 0.1*midv(2)]; - endif - else - ## they're at least one-dimensional - tolv = max(1e-8, 1e-8*abs(midv)); - if (abs (delv(1)) >= tolv(1)) - axdel(1:2) = 1.1*[-delv(1),delv(1)]; - endif - if (abs (delv(2)) >= tolv(2)) - axdel(3:4) = 1.1*[-delv(2),delv(2)]; - endif - endif - axvec = axmid + axdel; - -endfunction Added: trunk/octave-forge/main/control/inst/__axis_limits__.m =================================================================== --- trunk/octave-forge/main/control/inst/__axis_limits__.m (rev 0) +++ trunk/octave-forge/main/control/inst/__axis_limits__.m 2010-09-15 01:46:45 UTC (rev 7725) @@ -0,0 +1,71 @@ +## Copyright (C) 1998, 2000, 2004, 2005, 2007 +## Auburn University. All rights reserved. +## +## +## This program 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 3 of the License, or (at +## your option) any later version. +## +## This program 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 this program; see the file COPYING. If not, see +## <http://www.gnu.org/licenses/>. + +## -*- texinfo -*- +## @deftypefn {Function File} {} __axis_limits__ (@var{axdata}) +## Determine axis limits for 2-D data (column vectors); leaves a 10% +## margin around the plots. +## Inserts margins of +/- 0.1 if data is one-dimensional +## (or a single point). +## +## @strong{Input} +## @table @var +## @item axdata +## @var{n} by 2 matrix of data [@var{x}, @var{y}]. +## @end table +## +## @strong{Output} +## @table @var +## @item axvec +## Vector of axis limits appropriate for call to @command{axis} function. +## @end table +## @end deftypefn + +function axvec = __axis_limits__ (axdata) + + if (nargin < 1 || isempty (axdata)) + axdata = 0; + endif + + ## compute axis limits + minv = min (axdata); + maxv = max (axdata); + delv = (maxv-minv)/2; # breadth of the plot + midv = (minv + maxv)/2; # midpoint of the plot + axmid = [midv(1), midv(1), midv(2), midv(2)]; + axdel = [-0.1, 0.1, -0.1, 0.1]; # default plot width (if less than 2-d data) + if (max (delv) == 0) + if (midv(1) != 0) + axdel(1:2) = [-0.1*midv(1), 0.1*midv(1)]; + endif + if (midv(2) != 0) + axdel(3:4) = [-0.1*midv(2), 0.1*midv(2)]; + endif + else + ## they're at least one-dimensional + tolv = max(1e-8, 1e-8*abs(midv)); + if (abs (delv(1)) >= tolv(1)) + axdel(1:2) = 1.1*[-delv(1),delv(1)]; + endif + if (abs (delv(2)) >= tolv(2)) + axdel(3:4) = 1.1*[-delv(2),delv(2)]; + endif + endif + axvec = axmid + axdel; + +endfunction Added: trunk/octave-forge/main/control/inst/__check_name_numel__.m =================================================================== --- trunk/octave-forge/main/control/inst/__check_name_numel__.m (rev 0) +++ trunk/octave-forge/main/control/inst/__check_name_numel__.m 2010-09-15 01:46:45 UTC (rev 7725) @@ -0,0 +1,38 @@ +## Copyright (C) 2009 -2010 Lukas F. Reichlin +## +## This file is part of LTI Syncope. +## +## LTI Syncope 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 3 of the License, or +## (at your option) any later version. +## +## LTI Syncope 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 this program. If not, see <http://www.gnu.org/licenses/>. + +## -*- texinfo -*- +## Check whether a cell contains the required number of strings. +## Used by set and __set__. + +## Author: Lukas Reichlin <luk...@gm...> +## Created: October 2009 +## Version: 0.2 + +function name = __check_name_numel__ (name, req_len) + + if (! iscell (name)) # catch the siso case, + name = {name}; # e.g. sys = set (sys, "inname", "u_1") + endif + + name = reshape (name, [], 1); + + if (numel (name) != req_len) + error ("lti: set: cell must contain %d strings", req_len); + endif + +endfunction \ No newline at end of file Deleted: trunk/octave-forge/main/control/inst/__checkname__.m =================================================================== --- trunk/octave-forge/main/control/inst/__checkname__.m 2010-09-15 00:52:51 UTC (rev 7724) +++ trunk/octave-forge/main/control/inst/__checkname__.m 2010-09-15 01:46:45 UTC (rev 7725) @@ -1,38 +0,0 @@ -## Copyright (C) 2009 -2010 Lukas F. Reichlin -## -## This file is part of LTI Syncope. -## -## LTI Syncope 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 3 of the License, or -## (at your option) any later version. -## -## LTI Syncope 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 this program. If not, see <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## Check whether a cell contains the required number of strings. -## Used by set and __set__. - -## Author: Lukas Reichlin <luk...@gm...> -## Created: October 2009 -## Version: 0.2 - -function name = __checkname__ (name, req_len) - - if (! iscell (name)) # catch the siso case, - name = {name}; # e.g. sys = set (sys, "inname", "u_1") - endif - - name = reshape (name, [], 1); - - if (numel (name) != req_len) - error ("lti: set: cell must contain %d strings", req_len); - endif - -endfunction \ No newline at end of file Added: trunk/octave-forge/main/control/inst/__mark_empty_names__.m =================================================================== --- trunk/octave-forge/main/control/inst/__mark_empty_names__.m (rev 0) +++ trunk/octave-forge/main/control/inst/__mark_empty_names__.m 2010-09-15 01:46:45 UTC (rev 7725) @@ -0,0 +1,34 @@ +## Copyright (C) 2009 Lukas F. Reichlin +## +## This file is part of LTI Syncope. +## +## LTI Syncope 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 3 of the License, or +## (at your option) any later version. +## +## LTI Syncope 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 this program. If not, see <http://www.gnu.org/licenses/>. + +## -*- texinfo -*- +## Check whether a string of the cell "name" is empty and mark them +## with "?". Used by display routines. + +## Author: Lukas Reichlin <luk...@gm...> +## Created: October 2009 +## Version: 0.1 + +function name = __mark_empty_names__ (name) + + for k = 1 : numel (name) + if (isempty (name{k})) + name{k} = "?"; + endif + endfor + +endfunction \ No newline at end of file Deleted: trunk/octave-forge/main/control/inst/__markemptynames__.m =================================================================== --- trunk/octave-forge/main/control/inst/__markemptynames__.m 2010-09-15 00:52:51 UTC (rev 7724) +++ trunk/octave-forge/main/control/inst/__markemptynames__.m 2010-09-15 01:46:45 UTC (rev 7725) @@ -1,34 +0,0 @@ -## Copyright (C) 2009 Lukas F. Reichlin -## -## This file is part of LTI Syncope. -## -## LTI Syncope 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 3 of the License, or -## (at your option) any later version. -## -## LTI Syncope 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 this program. If not, see <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## Check whether a string of the cell "name" is empty and mark them -## with "?". Used by display routines. - -## Author: Lukas Reichlin <luk...@gm...> -## Created: October 2009 -## Version: 0.1 - -function name = __markemptynames__ (name) - - for k = 1 : numel (name) - if (isempty (name{k})) - name{k} = "?"; - endif - endfor - -endfunction \ No newline at end of file Modified: trunk/octave-forge/main/control/inst/__time_response__.m =================================================================== --- trunk/octave-forge/main/control/inst/__time_response__.m 2010-09-15 00:52:51 UTC (rev 7724) +++ trunk/octave-forge/main/control/inst/__time_response__.m 2010-09-15 01:46:45 UTC (rev 7725) @@ -161,7 +161,7 @@ if (isempty (outname) || isequal ("", outname{:})) outname = strseq ("y_", 1 : length (outname)); else - outname = __markemptynames__ (outname); + outname = __mark_empty_names__ (outname); endif if (strcmp (resptype, "initial")) Modified: trunk/octave-forge/main/control/inst/bode.m =================================================================== --- trunk/octave-forge/main/control/inst/bode.m 2010-09-15 00:52:51 UTC (rev 7724) +++ trunk/octave-forge/main/control/inst/bode.m 2010-09-15 01:46:45 UTC (rev 7725) @@ -65,9 +65,9 @@ mag_db = 20 * log10 (mag); wv = [min(w), max(w)]; - ax_vec_mag = __axis2dlim__ ([reshape(w, [], 1), reshape(mag_db, [], 1)]); + ax_vec_mag = __axis_limits__ ([reshape(w, [], 1), reshape(mag_db, [], 1)]); ax_vec_mag(1:2) = wv; - ax_vec_pha = __axis2dlim__ ([reshape(w, [], 1), reshape(pha, [], 1)]); + ax_vec_pha = __axis_limits__ ([reshape(w, [], 1), reshape(pha, [], 1)]); ax_vec_pha(1:2) = wv; if (isct (sys)) Modified: trunk/octave-forge/main/control/inst/bodemag.m =================================================================== --- trunk/octave-forge/main/control/inst/bodemag.m 2010-09-15 00:52:51 UTC (rev 7724) +++ trunk/octave-forge/main/control/inst/bodemag.m 2010-09-15 01:46:45 UTC (rev 7725) @@ -62,7 +62,7 @@ mag_db = 20 * log10 (mag); wv = [min(w), max(w)]; - ax_vec_mag = __axis2dlim__ ([reshape(w, [], 1), reshape(mag_db, [], 1)]); + ax_vec_mag = __axis_limits__ ([reshape(w, [], 1), reshape(mag_db, [], 1)]); ax_vec_mag(1:2) = wv; if (isct (sys)) Modified: trunk/octave-forge/main/control/inst/lsim.m =================================================================== --- trunk/octave-forge/main/control/inst/lsim.m 2010-09-15 00:52:51 UTC (rev 7724) +++ trunk/octave-forge/main/control/inst/lsim.m 2010-09-15 01:46:45 UTC (rev 7725) @@ -141,7 +141,7 @@ if (isempty (outname) || isequal ("", outname{:})) outname = strseq ("y_", 1 : length (outname)); else - outname = __markemptynames__ (outname); + outname = __mark_empty_names__ (outname); endif if (discrete) # discrete system Modified: trunk/octave-forge/main/control/inst/margin.m =================================================================== --- trunk/octave-forge/main/control/inst/margin.m 2010-09-15 00:52:51 UTC (rev 7724) +++ trunk/octave-forge/main/control/inst/margin.m 2010-09-15 01:46:45 UTC (rev 7725) @@ -270,9 +270,9 @@ gamma_db = 20 * log10 (gamma); wv = [min(w), max(w)]; - ax_vec_mag = __axis2dlim__ ([reshape(w, [], 1), reshape(mag_db, [], 1)]); + ax_vec_mag = __axis_limits__ ([reshape(w, [], 1), reshape(mag_db, [], 1)]); ax_vec_mag(1:2) = wv; - ax_vec_pha = __axis2dlim__ ([reshape(w, [], 1), reshape(pha, [], 1)]); + ax_vec_pha = __axis_limits__ ([reshape(w, [], 1), reshape(pha, [], 1)]); ax_vec_pha(1:2) = wv; wgm = [w_gamma, w_gamma]; Modified: trunk/octave-forge/main/control/inst/nichols.m =================================================================== --- trunk/octave-forge/main/control/inst/nichols.m 2010-09-15 00:52:51 UTC (rev 7724) +++ trunk/octave-forge/main/control/inst/nichols.m 2010-09-15 01:46:45 UTC (rev 7725) @@ -63,7 +63,7 @@ if (! nargout) mag_db = 20 * log10 (mag); - ax_vec = __axis2dlim__ ([reshape(pha, [], 1), reshape(mag_db, [], 1)]); + ax_vec = __axis_limits__ ([reshape(pha, [], 1), reshape(mag_db, [], 1)]); plot (pha, mag_db) axis (ax_vec) Modified: trunk/octave-forge/main/control/inst/nyquist.m =================================================================== --- trunk/octave-forge/main/control/inst/nyquist.m 2010-09-15 00:52:51 UTC (rev 7724) +++ trunk/octave-forge/main/control/inst/nyquist.m 2010-09-15 01:46:45 UTC (rev 7725) @@ -62,7 +62,7 @@ im = imag (H); if (! nargout) - ax_vec = __axis2dlim__ ([re, im; re, -im]); + ax_vec = __axis_limits__ ([re, im; re, -im]); plot (re, im, "b", re, -im, "r") axis (ax_vec) Modified: trunk/octave-forge/main/control/inst/rlocus.m =================================================================== --- trunk/octave-forge/main/control/inst/rlocus.m 2010-09-15 00:52:51 UTC (rev 7724) +++ trunk/octave-forge/main/control/inst/rlocus.m 2010-09-15 01:46:45 UTC (rev 7725) @@ -226,7 +226,7 @@ if (nargout == 0) rlpolv = vec(rlpol); axdata = [real(rlpolv), imag(rlpolv); real(olzer), imag(olzer)]; - axlim = __axis2dlim__ (axdata); + axlim = __axis_limits__ (axdata); rldata = [real(rlpolv), imag(rlpolv) ]; %inname = get (sys, "inname"); Modified: trunk/octave-forge/main/control/inst/sigma.m =================================================================== --- trunk/octave-forge/main/control/inst/sigma.m 2010-09-15 00:52:51 UTC (rev 7724) +++ trunk/octave-forge/main/control/inst/sigma.m 2010-09-15 01:46:45 UTC (rev 7725) @@ -84,8 +84,8 @@ sv_db = 20 * log10 (sv); ## determine axes - ax_vec = __axis2dlim__ ([reshape(w, [], 1), reshape(min(sv_db, [], 1), [], 1); - reshape(w, [], 1), reshape(max(sv_db, [], 1), [], 1)]); + ax_vec = __axis_limits__ ([reshape(w, [], 1), reshape(min(sv_db, [], 1), [], 1); + reshape(w, [], 1), reshape(max(sv_db, [], 1), [], 1)]); ax_vec(1:2) = [min(w), max(w)]; ## determine xlabel This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |