octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #42495] control : __frequency_response__ does


From: anonymous
Subject: [Octave-bug-tracker] [bug #42495] control : __frequency_response__ does not accept a scalar as w
Date: Mon, 02 Jun 2014 20:03:38 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:29.0) Gecko/20100101 Firefox/29.0

URL:
  <http://savannah.gnu.org/bugs/?42495>

                 Summary: control : __frequency_response__ does not accept a
scalar as w
                 Project: GNU Octave
            Submitted by: None
            Submitted on: lun. 02 juin 2014 20:03:38 UTC
                Category: Octave Forge Package
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Matlab Compatibility
                  Status: None
             Assigned to: None
         Originator Name: Thaeron
        Originator Email: address@hidden
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 3.8.1
        Operating System: Any

    _______________________________________________________

Details:

I was porting matlab/mathscript code to octave and a "curious" thing happened
:

[gain,phase]=bode(H, w);

gain and phase are vectors with lengths of 502. I was expecting vectors with
lengths of 1 because it's the case of w parameter and the documentation says
:

Function File: [mag, pha, w] = bode (sys, w)
mag
    Vector of magnitude. Has length of frequency vector w.
pha
    Vector of phase. Has length of frequency vector w. 

Matlab and mathscript have the behavior that I was expecting.

So I digg a bit and see in __frequency_response__ (which is used by bode) :

w_idx = cellfun (@(x) is_real_vector (x) && length (x) > 1, args);  # look for
frequency vectors

Does the "length(x) > 1" really necessary ? That breaks matlab compatibility
(and it's not explicitly explained in the documentation)...




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?42495>

_______________________________________________
  Message posté via/par Savannah
  http://savannah.gnu.org/




reply via email to

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