|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
very strange bugDear Octave Community
I'm using Octave.app 3.2.3 on MacOSX 10.6.1 and I noticed a really strange behaviour of Octave/my scripts: When executing the commands at the end of this mail, instance sysc is partially changed where it should stay the same. Am I doing something wrong or is it a nasty bug in Octave? Thanks in advance for every help! Regards, Lukas BTW: The script needs control-oo: http://octave.svn.sourceforge.net/viewvc/octave/trunk/octave-forge/extra/control-oo.tar.gz?view=tar 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 sysc = ss (-1, 1, 1, 0); % create a simple, continuous-time model sysc % everything is fine here sysd = c2d (sysc, 2) % now convert to discrete-time and save as sysd sysc % sysc should stay unaltered/continuous-time, but it is discrete- time now! % Note that matrices a and b are unaltered in sysc, only sampling time changed ------------------------------------------------------------------------------ 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 Octave-dev@... https://lists.sourceforge.net/lists/listinfo/octave-dev |
|
|
Re: very strange bugI 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 Octave-dev@... https://lists.sourceforge.net/lists/listinfo/octave-dev |
|
|
Re: very strange bugLukas,
I found this bug the other day - manifested differently. Worse, I think it is in some code that I contributed. I have no idea what is causing it. I did find a workaround, but will need access to my computer to provide that information. I am traveling right now and have limited email access and no computer access, but when I get home (one week from today) I will provide more information. I did strip the problem down to a very, very simple example. Bob Lukas Reichlin wrote: > 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 > Octave-dev@... > https://lists.sourceforge.net/lists/listinfo/octave-dev > > > ------------------------------------------------------------------------------ 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 Octave-dev@... https://lists.sourceforge.net/lists/listinfo/octave-dev |
|
|
Re: very strange bugHi Robert
Thanks for your answer. Good luck with squashing the bug! Regards Lukas > Lukas, > > I found this bug the other day - manifested differently. Worse, I > think it is in some code that I contributed. I have no idea what is > causing it. I did find a workaround, but will need access to my > computer to provide that information. > > I am traveling right now and have limited email access and no > computer access, but when I get home (one week from today) I will > provide more information. I did strip the problem down to a very, > very simple example. > > Bob > > > Lukas Reichlin wrote: >> 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 >> Octave-dev@... >> https://lists.sourceforge.net/lists/listinfo/octave-dev >> >> >> > ------------------------------------------------------------------------------ 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 Octave-dev@... https://lists.sourceforge.net/lists/listinfo/octave-dev |
| Free embeddable forum powered by Nabble | Forum Help |