octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: nichols.m error


From: David Bateman
Subject: Re: nichols.m error
Date: Wed, 22 Aug 2007 10:45:30 +0200
User-agent: Thunderbird 1.5.0.7 (X11/20060921)

Donald Parsons wrote:
> Found this while doing a tutorial:
>
> GNU Octave, version 2.9.13+  (cvs)
>
> octave:1> L = tf(3e4 * [0.0025 0.1 1], [0.01 1.03 3.03 3.01 1]);
> octave:2> nichols(L);
> parse error near line 134 of file /usr/local/share/octave/2.9.13
> +/m/control/base/nichols.m
>
>   syntax error
>   
Hi Donald,

I think a complete patch is the attached...

D.

-- 
David Bateman                                address@hidden
Motorola Labs - Paris                        +33 1 69 35 48 04 (Ph) 
Parc Les Algorithmes, Commune de St Aubin    +33 6 72 01 06 33 (Mob) 
91193 Gif-Sur-Yvette FRANCE                  +33 1 69 35 77 01 (Fax) 

The information contained in this communication has been classified as: 

[x] General Business Information 
[ ] Motorola Internal Use Only 
[ ] Motorola Confidential Proprietary

*** ./scripts/control/base/nichols.m.orig6      2007-08-22 10:44:24.515660818 
+0200
--- ./scripts/control/base/nichols.m    2007-08-22 10:42:21.952883061 +0200
***************
*** 82,88 ****
  ## and phase information is not computed.
  ## @end deftypefn
  
! function [mag, phase, w] = nichols (sys, w, outputs, inputs)
  
    ## check number of input arguments given
    if (nargin < 1 || nargin > 4)
--- 82,88 ----
  ## and phase information is not computed.
  ## @end deftypefn
  
! function [mag2, phase2, w2] = nichols (sys, w, outputs, inputs)
  
    ## check number of input arguments given
    if (nargin < 1 || nargin > 4)
***************
*** 111,120 ****
      ## Plot the information
  
      if (max (mag) > 0)
!       plot (phase, 20 * log10 (mag));
        ylabel ("Gain in dB");
      else
!       plot (phase, mag);
        ylabel ("Gain |Y/U|")
      endif
  
--- 111,122 ----
      ## Plot the information
  
      if (max (mag) > 0)
!       md = 20 * log10 (mag);
!       plot (phase, md);
        ylabel ("Gain in dB");
      else
!       md = mag;
!       plot (phase, md);
        ylabel ("Gain |Y/U|")
      endif
  
***************
*** 131,137 ****
      if (is_siso (sys))
        title (sprintf ("Nichols plot of |[Y/U]%s|, u=%s, y=%s", tistr,
                      sysgetsignals (sys, "in", 1, 1),
!                     sysgetsignals (sys, "out", 1, 1));
      else
        title ([ "||Y(", tistr, ")/U(", tistr, ")||"]);
        printf ("MIMO plot from\n%s\nto\n%s\n", __outlist__ (inname, "    "),
--- 133,139 ----
      if (is_siso (sys))
        title (sprintf ("Nichols plot of |[Y/U]%s|, u=%s, y=%s", tistr,
                      sysgetsignals (sys, "in", 1, 1),
!                     sysgetsignals (sys, "out", 1, 1)));
      else
        title ([ "||Y(", tistr, ")/U(", tistr, ")||"]);
        printf ("MIMO plot from\n%s\nto\n%s\n", __outlist__ (inname, "    "),
***************
*** 139,146 ****
      endif
  
      axis (axis2dlim ([phase(:), md(:)]));
! 
!     mag = phase = w = [];
    endif
  
  endfunction
--- 141,150 ----
      endif
  
      axis (axis2dlim ([phase(:), md(:)]));
!   else
!     mag2 = mag;
!     phase2 = phase;
!     w2 = w;
    endif
  
  endfunction

reply via email to

[Prev in Thread] Current Thread [Next in Thread]