[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #43947] TF function in Control returns differe
From: |
anonymous |
Subject: |
[Octave-bug-tracker] [bug #43947] TF function in Control returns different sized x.Num and x.Den if higher order coefficients missing |
Date: |
Tue, 06 Jan 2015 22:54:12 +0000 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36 |
URL:
<http://savannah.gnu.org/bugs/?43947>
Summary: TF function in Control returns different sized x.Num
and x.Den if higher order coefficients missing
Project: GNU Octave
Submitted by: None
Submitted on: Tue 06 Jan 2015 10:54:11 PM UTC
Category: Octave Forge Package
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: None
Status: None
Assigned to: None
Originator Name: Scott Jobling
Originator Email: address@hidden
Open/Closed: Open
Discussion Lock: Any
Release: 3.8.2
Operating System: Microsoft Windows
_______________________________________________________
Details:
I was running a script originally built for Matlab and ran into several
out-of-bounds errors when making assumptions about how many modeling
coefficients should be returned by the numerator/denominator calls. I believe
this is an issue with the x.Num/Den properties only returning the minimum
necessary coefficients from the control model parameters. The person that
wrote this for Matlab did so in the last two years, so I'm assuming the issues
is on the Octave end. So, via Octave's TF function:
% (2*s^2 + 1*s^1 + 0) / (3*s^3 + 2*s^2 + 1*s^1 + 0)
x.Num % 2 1 0
x.Den % 3 2 1 0
Padding the smaller of the x.Num / x.Den returned arrays with zeros for the
missing coefficients fixed the problem for me.
num = x.Num;
num = padarray(num, [0 2], 'pre');
% num => 0 2 1 0 => same size as x.Den
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?43947>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #43947] TF function in Control returns different sized x.Num and x.Den if higher order coefficients missing,
anonymous <=