On Wed, Jun 29, 2011 at 08:59:16AM +0200, Olaf Till wrote:
> On Wed, Jun 29, 2011 at 12:06:14AM +0200, Carlo de Falco wrote:
> > 
> > On 28 Jun 2011, at 18:06, Carlo de Falco wrote:
> > 
> > > Hi,
> > > 
> > > I am posting this to both Octave and Octave-Forge as I think this 
> > > problem encountered while running a function from the 'optim' package
> > > actually exposes some bug in Octave itself. 
> > > If others can confirm this behaviour 'll try to better identify the bug 
> > > and report it to the bug tracker.
> > 
> > OK, I tracked down the problem which seems to have been in cell2cell which 
> > is a 
> > function from the "miscellaneous" package (i.e. not in Octave core, so 
> > sorry for 
> > the noise on the Octave ML)
> > 
> > whith the current version of cell2cell the following happens:
> > 
> > ------------
> > >> function prova ()
> > m = 1; n = 1;
> > plabels = cell2cell (num2cell ((1:n).'), 1);
> > m
> > endfunction
> > >> prova
> > error: `m' undefined near line 4 column 1
> > error: called from:
> > error:   ?unknown? at line 4, column 1
> > >> 
> > ------------
> > 
> > if I apply the attached patch I get, instead
> > 
> > ------------
> > >> function prova ()
> > m = 1; n = 1;
> > plabels = cell2cell (num2cell ((1:n).'), 1);
> > m
> > endfunction
> > >> prova
> > m =  1
> > >> 
> > -------------
> > 
> > 
> > 
> > Does anyone object if I 
> > 
> > 1) commit this patch
> > 2) bump the version number in "miscelaneous" and "optim"
> > 3) increase the version number for the dependency on "miscellaneous"
> > in "optim
> 
> Please wait a minute.
> 
> In SVN some days ago I had already removed any usage of "cell2cell" in
> the optim package, including leasqr (replaced it by num2cell). And
> your example with leasqr works for me. So there is no need to increase
> the version number for the dependency on "miscellaneous" (actually I
> had _decreased_ this number some days ago, there is only a dependency
> now due to some older code using a different scheme for option
> handling). As for increasing the packages version numbers (i.e. of
> miscellaneous), I had already increased it in SVN directly after the
> last release, and think we should keep this new number until after the
> next release.
> 
> The remaining point is cell2cell and your patch. Since I wrote
> cell2cell (I left in miscellaneous since it can't be replaced by
> num2cell in every case (but actually it can be replaced by mat2cell
> with some effort)), I'd like to look at this issue first. Please wait
> a few minutes till I'm ready.

I'm not ready, but:

Your example with cell2cell works for me, too:

octave:5> function prova ()
> m = 1; n = 1;
> plabels = cell2cell (num2cell ((1:n).'), 1);
> m
> endfunction
octave:6> prova
m =  1
octave:7> 

Which Octave version do you use?

And your patch seems to change much. Could you make it easier for me
and tell me what was the change which is needed to fix the supposed
bug, and what was actually wrong before?

Olaf

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
Octave-dev mailing list
Octave-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/octave-dev

Reply via email to