I modified my example below to make the bug obvious. It's really a
nasty bug ;-) Somehow the objects are not properly "encapsulated",
i.e. there is some kind of partial "passing by reference". I'm using
Octave.app 3.2.3 on a recent MacBookPro with Intel Core2Duo and MacOSX
10.6.1.
Regards,
Lukas
clear all;
close all;
clc;
% script needs control-oo installed, not the "legacy" control package
s = tf ('s'); % this is a simple control-oo-only feature
% create a simple, continuous-time model
syscont = ss (-1, 1, 1, 0);
% make a copy of sysc (!) just to be sure that c2d has
% no influence on syscont (but it has)
syscopy = syscont
% now convert syscopy to discrete-time and save as sysdisc
sysdisc = c2d (syscopy, 2)
% syscont should stay continuous-time (what else?),
% but it is discrete-time now as well!
syscont
% Note that matrices a and b are unaltered in syscont (which is right),
% only sampling time changed to 2 seconds (which is obviously WRONG!).
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Octave-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/octave-dev