John W. Eaton | 1 Jul 2005 19:37
Picon

Crash on unexpected end_try_catch

On 30-Jun-2005, Søren Hauberg wrote:

| On Ubuntu Linux, using a self-compiled Octave 2.1.71 (details below) I 
| get a crash when trying the following program
| 
| if (false)
| 	disp("hello")
| end_try_catch
| 
| I get the following error message:
| parse error:
| 
|  >>> end_try_catch
|                  ^
| 
| panic: impossible state reached in file `parse.y' at line 1689
| panic: Aborted -- stopping myself...
| attempting to save variables to `octave-core'...
| save to `octave-core' complete
| Afbrudt (SIGABRT)

Please try the following patch.

Thanks,

jwe

src/ChangeLog:

2005-07-01  John W. Eaton  <jwe <at> octave.org>
(Continue reading)

John W. Eaton | 1 Jul 2005 19:47
Picon

Re: bug with logical or?

On 29-Jun-2005, Miroslaw Kwasniak wrote:

| On Tue, Jun 28, 2005 at 05:41:08AM -0500, Beck, Andrew Thomas - BECAT001 wrote:
| > Hi, 
| > I have found what I think is a bug with the | operator. If
| > you do 1 | 0, obviously you get 1. If you do find([1]) | find([0])
| > you get 0. 
| 
| Which version of octave and which you use? All versions (from 2.0.17 to
| 2.9.2) on my machine give  
| 
| octave:1> find([1]) | find([0])
| ans = [](0x0)

I think this is also consistent with Matlab.

However, with Matlab, if you use this expression in the context of the
condition of a WHILE or IF statement, it short-circuits, and Matlab
will only evaluate the "find (1)" part of the expression, resulting a
different result.  For example, try this:

  t = 1 | []
  if (t)
    disp ('should not print');
  end

  if (1 | [])
    disp ('gotcha');
  end

(Continue reading)

Ben Barrowes | 1 Jul 2005 23:14
Picon
Favicon

Re: statistics distributions function names

I did as you suggested and the following diffs_weibrnd file is the 
result (also attached).

mv statistics/distributions/weibull_rnd.m statistics/distributions/weibrnd.m
--- statistics/distributions/weibrnd.m.orig    2005-07-01 
14:59:14.000000000 -0600
+++ statistics/distributions/weibrnd.m    2005-07-01 15:00:42.000000000 
-0600
 <at>  <at>  -18,8 +18,8  <at>  <at> 
 ## 02110-1301, USA.

 ## -*- texinfo -*-
-##  <at> deftypefn {Function File} {} weibull_rnd ( <at> var{alpha},  <at> var{sigma}, 
 <at> var{r},  <at> var{c})
-##  <at> deftypefnx {Function File} {} weibull_rnd ( <at> var{alpha}, 
 <at> var{sigma},  <at> var{sz})
+##  <at> deftypefn {Function File} {} weibrnd ( <at> var{alpha},  <at> var{sigma}, 
 <at> var{r},  <at> var{c})
+##  <at> deftypefnx {Function File} {} weibrnd ( <at> var{alpha},  <at> var{sigma}, 
 <at> var{sz})
 ## Return an  <at> var{r} by  <at> var{c} matrix of random samples from the
 ## Weibull distribution with parameters  <at> var{alpha} and  <at> var{sigma}
 ## which must be scalar or of size  <at> var{r} by  <at> var{c}. Or if  <at> var{sz}
 <at>  <at>  -32,23 +32,23  <at>  <at> 
 ## Author: KH <Kurt.Hornik <at> ci.tuwien.ac.at>
 ## Description: Random deviates from the Weibull distribution

-function rnd = weibull_rnd (shape, scale, r, c)
+function rnd = weibrnd (shape, scale, r, c)

(Continue reading)

Søren Hauberg | 2 Jul 2005 19:38

Re: Crash on unexpected end_try_catch

John W. Eaton wrote:
> Please try the following patch.
Seems to work.

Thanks,
Søren

-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------

Brian Blais | 3 Jul 2005 14:34

size function does not return 2 args (like Matlab)

Bug report for Octave 2.1.71 configured for i686-pc-linux-gnu

Description:
-----------

The size function should allow two output arguments to be compatible
with matlab.

In Matlab you do:

>> a=rand(5,3)

a =

    9.5013e-01   7.6210e-01   6.1543e-01
    2.3114e-01   4.5647e-01   7.9194e-01
    6.0684e-01   1.8504e-02   9.2181e-01
    4.8598e-01   8.2141e-01   7.3821e-01
    8.9130e-01   4.4470e-01   1.7627e-01

>> [m,n]=size(a)

m =

      5

n =

      3

(Continue reading)

Shai Ayal | 4 Jul 2005 08:36
Picon

Re: size function does not return 2 args (like Matlab)

works for me:

GNU Octave, version 2.1.71 (i686-pc-linux-gnu).
Copyright (C) 2005 John W. Eaton.
This is free software; see the source code for copying conditions.
There is ABSOLUTELY NO WARRANTY; not even for MERCHANTIBILITY or
FITNESS FOR A PARTICULAR PURPOSE.  For details, type `warranty'.

Additional information about Octave is available at http://www.octave.org.

Please contribute if you find this software useful.
For more information, visit http://www.octave.org/help-wanted.html

Report bugs to <bug <at> octave.org> (but first, please read
http://www.octave.org/bugs.html to learn how to write a helpful report).

octave:1> [a,b]=size(ones(10,14))
a = 10
b = 14
octave:2> which size
size is a built-in function
octave:3>

Brian Blais wrote:
> Bug report for Octave 2.1.71 configured for i686-pc-linux-gnu
> 
> Description:
> -----------
> 
> The size function should allow two output arguments to be compatible
(Continue reading)

John W. Eaton | 5 Jul 2005 16:34
Picon

bug in findstr

On 27-Jun-2005, Etienne de Foras wrote:

| Hello,
| 
| Just a little bug in findstr:
| 
| findstr('','') = has size 0x0
| 
| findstr('oo','nn') = has size 0x0
| 
| but
| 
| findstr('ojo','nn') = has size 1x0
| 
| See you
| 
| Etienne de Foras
| 
| version=2.9.3

I'm not sure what is really correct here, but I think the following
patch will provide compatible behavior.

Thanks,

jwe

scripts/ChangeLog:

2005-07-05  John W. Eaton  <jwe <at> octave.org>
(Continue reading)

John W. Eaton | 5 Jul 2005 16:36
Picon

build warnings for ocatve 2.1.69 under Gentoo Linux

OK, but what is the bug here?

jwe

On 26-Jun-2005, Toralf Frster wrote:

| -----BEGIN PGP SIGNED MESSAGE-----
| Hash: SHA1
| 
| Following warnings I got during build of octave:
| - ----------------------------------------------------------------------------------------
| 
| i686-pc-linux-gnu-g++ -c  -fPIC -I. -I.. -I../liboctave -I../src 
| - -I../libcruft/misc  -I../glob -I../glob -DHAVE_CONFIG_H -mieee-fp -
| Wall -W -Wshadow -O2 -march=pentium3 -fomit-frame-pointer -pipe 
| c-file-ptr-stream.cc -o pic/c-file-ptr-stream.o
| c-file-ptr-stream.cc: In member function `virtual std::streampos
|    c_file_ptr_buf::seekoff(long int, std::_Ios_Seekdir, std::_Ios_Openmode)':
| c-file-ptr-stream.cc:134: warning: unused parameter `streamoff offset'
| c-file-ptr-stream.cc:134: warning: unused parameter `std::_Ios_Seekdir dir'
| c-file-ptr-stream.cc: In member function `virtual std::streampos
|    c_file_ptr_buf::seekpos(std::fpos<mbstate_t>, std::_Ios_Openmode)':
| c-file-ptr-stream.cc:151: warning: unused parameter `std::streampos offset'
| 
| i686-pc-linux-gnu-g++ -c  -fPIC -I. -I.. -I../liboctave -I../src 
| - -I../libcruft/misc  -I../glob -I../glob -DHAVE_CONFIG_H -mieee-fp -
| Wall -W -Wshadow -O2 -march=pentium3 -fomit-frame-pointer -pipe ov-int64.cc -o 
| pic/ov-int64.o
| ov-typeinfo.cc: In member function `int
|    octave_value_typeinfo::do_register_type(const std::string&, const
(Continue reading)

John W. Eaton | 5 Jul 2005 16:37
Picon

enhancement for the Makefile

On 26-Jun-2005, Toralf Frster wrote:

| -----BEGIN PGP SIGNED MESSAGE-----
| Hash: SHA1
| 
| Building octave 2.1.69 on my (linux) system I found warnings about missing 
| tex2pdf and tex2html in my log. In the case where a system lacks both of 
| these commands the previously step to made all *.texi files can be skipped., 
| isn't it ?

Why should building the documentation be skipped?  Wouldn't it be
better to install the necessary tools to properly complete the build?

jwe

-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------

John W. Eaton | 5 Jul 2005 16:44
Picon

Bug report: dec2base.m

On 25-Jun-2005, cctsim wrote:

| Octave version: 2.1.71
| 
| Bug Description: dec2base(0,2) returns an empty string
| 
| Possible patch:
| 
| --- /usr/share/octave/2.1.71/m/strings/dec2base.m.orig	2005-06-25
| 01:07:17.000000000 +0100
| +++ /usr/share/octave/2.1.71/m/strings/dec2base.m	2005-06-25
| 01:18:52.000000000 +0100
|  <at>  <at>  -95,7 +95,7  <at>  <at> 
|    ## have a leading zero to remove.  But if LEN >= MAX_LEN, we should
|    ## not remove any leading zeros.
|    if ((nargin == 2 || (nargin == 3 && max_len > len))
| -      && all (retval(:,1) == symbols(1)))
| +      && all (retval(:,1) == symbols(1)) && (length(retval)~=1))
|      retval = retval(:,2:end);
|    endif

I made this change.

Thanks,

jwe

-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

(Continue reading)


Gmane