bugGNU Octave - Bugs: bug #42495, control package: bode does not...

 
 

bug #42495: control package: bode does not accept a scalar as w

Submitted by:  None
Submitted on:  Mon 02 Jun 2014 08:03:38 PM UTC  
 
Category: Octave Forge PackageSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Matlab Compatibility
Status: FixedAssigned to: None
Originator Name: ThaeronOriginator Email: -unavailable-
Open/Closed: ClosedRelease: other
Operating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sun 18 Oct 2015 04:49:04 PM UTC, comment #4:

Thanks for your report and patience. I've just pushed a changeset:

https://bitbucket.org/paramaniac/control/commits/f1f2175c8ca54ff916f741c3e1793ac6cef79910

The fix will be part of the upcoming control package version 3.0.0

Lukas Reichlin <paramaniac>
Fri 19 Jun 2015 04:22:49 PM UTC, comment #3:

I've done your test. That's the result :

>> sys = tf(1, [1 1]);
>> [mag, phase] = bode(sys);
>> size(mag), size(phase)


ans =

1 1 55

ans =

1 1 55

>> [mag, phase] = bode(sys, [0.1 1 10 100]);
>> size(mag), size(phase)


ans =

1 1 4

ans =

1 1 4

>> [mag, phase] = bode(sys, [1 1])


mag(:,:,1) =

0.7071

mag(:,:,2) =

0.7071

phase(:,:,1) =

-45

phase(:,:,2) =

-45

>> [mag, phase] = bode(sys, 1)


mag =

0.7071

phase =

-45

Anonymous
Fri 19 Jun 2015 02:00:14 PM UTC, comment #2:

Still waiting for someone to run a provided example in Matlab, adding control package maintainer in cc in the meantime.

Mike Miller <mtmiller>
Project Administrator
Thu 15 Jan 2015 03:09:53 AM UTC, comment #1:

Thanks for your bug report. I can't confirm, no access to Matlab's control toolbox at the moment, but what you describe seems reasonable based on a quick reading of http://www.mathworks.com/help/control/ref/bode.html. Namely, whether w is a vector or a scalar, bode should plot or return the evaluation of the system at the discrete frequencies in w.

If someone with access to the control toolbox can run a test, try

Mike Miller <mtmiller>
Project Administrator
Mon 02 Jun 2014 08:03:38 PM UTC, original submission:

I was porting matlab/mathscript code to octave and a "curious" thing happened :
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 :
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) :
Does the "length(x) > 1" really necessary ? That breaks matlab compatibility (and it's not explicitly explained in the documentation)...

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by paramaniac (Posted a comment)
  • -unavailable- added by mtmiller
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by None (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 19 Oct 2015 02:26:25 PM UTCmtmillerStatusNeed Info=>Fixed
      Open/ClosedOpen=>Closed
    Fri 19 Jun 2015 02:00:14 PM UTCmtmillerCarbon-Copy-=>Added paramaniac
    Fri 19 Jun 2015 02:00:13 PM UTCmtmillerRelease3.8.1=>other
    Thu 15 Jan 2015 03:09:53 AM UTCmtmillerStatusNone=>Need Info
      Summarycontrol : _frequency_response_ does not accept a scalar as w=>control package: bode does not accept a scalar as w

    Back to the top


    Powered by Savane 3.1-cleanup1