[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #65803] [Octave packages] (control) function '
From: |
Nicholas Jankowski |
Subject: |
[Octave-bug-tracker] [bug #65803] [Octave packages] (control) function 'bode' returns wrong output for phase |
Date: |
Tue, 28 May 2024 11:46:47 -0400 (EDT) |
Update of bug #65803 (group octave):
Status: None => Fixed
Open/Closed: Open => Closed
Summary: function 'bode' returns wrong type for phase =>
[Octave packages] (control) function 'bode' returns wrong output for phase
_______________________________________________________
Follow-up Comment #1:
while i can confirm that in in octave 9.1.0, which I believe ships with
control 4.0.0:
octave:4> [m,p,w] = bode (tf(1));
octave:5> whos
Variables visible from the current scope:
variables in scope: top scope
Attr Name Size Bytes Class
==== ==== ==== ===== =====
m 1000x1 8000 double
p 1x1 8000 cell
w 1x1000 8000 double
Total is 2001 elements using 24000 bytes
Updating the control package to the current 4.0.1 seems to return to your
expected behavior:
>> pkg install -global control-4.0.1.tar.gz
The control package was installed into the directory
<snip>
License and copyright information can be found in "packinfo/COPYING"
For information about changes from previous versions of the control package,
run 'news control'.
>> ver control
----------------------------------------------------------------------
GNU Octave Version: 9.1.0 (hg id: d0c18b1446df)
GNU Octave License: GNU General Public License
Operating System: MINGW32_NT-6.2 Windows 6.2 x86_64
----------------------------------------------------------------------
Package Name | Version | Installation directory
--------------+---------+-----------------------
control | 4.0.1 | <snip>
>> pkg load control
>> [m,p,w] = bode (tf(1));
>> whos
Variables visible from the current scope:
variables in scope: top scope
Attr Name Size Bytes Class
==== ==== ==== ===== =====
m 1000x1 8000 double
p 1000x1 8000 double
w 1x1000 8000 double
Total is 3000 elements using 24000 bytes
I don't see any mention of changes to the tf or bode functions in `news
control`, but it appears this issue was fixed. Also, the soon to be released
Octave 9.2.0 should come bundled with v4.0.1.
For now, installing the newer package should fix the problem for you. running
the command below should work for most people:
pkg install -forge control
to install the newer package version locally in your user profile folder
or
pkg install -forge -global control
to update the bundled version in the octave installation package, if you have
rights to make such changes on your machine.
(it is worth noting for compatibility that the outputs do not quite match
matlab output, which produces:
m 1x1x41 328 double
p 1x1x41 328 double
w 41x1 328 double
but that should probably be handled elsewhere.
marking as fixed and closing report.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?65803>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/