Quentin Spencer | 1 Oct 2004 18:19
Picon

plot(x) kills octave when x is N-dimensional

Bug report for Octave 2.1.60 (CVS) configured for i686-pc-linux-gnu

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

Calling the "plot" command with a single array argument kills octave
when the array has larger then 2 dimensions. The output from an
example is included below.

Repeat-By:
---------

octave:1> x=ones(2,3,1);
octave:2> plot(x)
Warning: empty y range [1:1], adjusting to [0.99:1.01]
octave:3> x=ones(2,3,4);
octave:4> plot(x)
octave: ../liboctave/dim-vector.h:104: int&
dim_vector::dim_vector_rep::elem(int): Assertion `i >= 0 && i < ndims'
failed.
panic: Aborted -- stopping myself...
attempting to save variables to `octave-core'...
Warning: empty y range [1:1], adjusting to [0.99:1.01]
Warning: empty y range [1:1], adjusting to [0.99:1.01]
save to `octave-core' complete
Aborted

Fix:
---

(Continue reading)

Quentin Spencer | 1 Oct 2004 19:32
Picon

Old e-mail addresses

This isn't really a bug, but something that should eventually be 
updated. I noticed that while the old addresses still work, the octave 
mailing list addresses have been updated a while ago to be bug, help, 
etc.  <at> octave.org. However some of the documentation still gives the old 
addresses: the command "grep -r octave <at>  *" in the source directory gives 
several hits. I'm not an expert on the use of sed, but I'm sure the 
right sed command could fix all reference pretty quickly.

-Quentin

-------------------------------------------------------------
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 | 1 Oct 2004 19:54
Picon

plot(x) kills octave when x is N-dimensional

On  1-Oct-2004, Quentin Spencer <qspencer <at> ieee.org> wrote:

| Bug report for Octave 2.1.60 (CVS) configured for i686-pc-linux-gnu
| 
| Description:
| -----------
| 
| Calling the "plot" command with a single array argument kills octave
| when the array has larger then 2 dimensions. The output from an
| example is included below.
| 
| Repeat-By:
| ---------
| 
| octave:1> x=ones(2,3,1);
| octave:2> plot(x)
| Warning: empty y range [1:1], adjusting to [0.99:1.01]
| octave:3> x=ones(2,3,4);
| octave:4> plot(x)
| octave: ../liboctave/dim-vector.h:104: int&
| dim_vector::dim_vector_rep::elem(int): Assertion `i >= 0 && i < ndims'
| failed.
| panic: Aborted -- stopping myself...
| attempting to save variables to `octave-core'...
| Warning: empty y range [1:1], adjusting to [0.99:1.01]
| Warning: empty y range [1:1], adjusting to [0.99:1.01]
| save to `octave-core' complete
| Aborted

The plot commands need to be fixed to produce errors when they are
(Continue reading)

John W. Eaton | 1 Oct 2004 20:12
Picon

Old e-mail addresses

On  1-Oct-2004, Quentin Spencer <qspencer <at> ieee.org> wrote:

| This isn't really a bug, but something that should eventually be 
| updated. I noticed that while the old addresses still work, the octave 
| mailing list addresses have been updated a while ago to be bug, help, 
| etc.  <at> octave.org. However some of the documentation still gives the old 
| addresses: the command "grep -r octave <at>  *" in the source directory gives 
| several hits. I'm not an expert on the use of sed, but I'm sure the 
| right sed command could fix all reference pretty quickly.

I think I've fixed most of them now.

Thanks,

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 | 1 Oct 2004 22:10
Picon

Re: Evaulation of non-integer subscripts (Correction)

On 28-Sep-2004, Michael J. Belisle <mbelisle <at> asu.edu> wrote:

| A ha--it appears to only behave incorrectly for a 1x1 array and 
| 0.5<=index<1. (I guess I over-generalized three times.  Will improve 
| next time.)
| 
| octave:79> x = [1,2,3,4]
| x =
| 
|    1  2  3  4
| 
| octave:80> x(0.5)
| error: expecting integer index, found 0.500000
| octave:80> x = 1
| x = 1
| octave:81> x(0.5)
| ans = 1

Please try the following patch.

Thanks,

jwe

src/ChangeLog:

2004-10-01  John W. Eaton  <jwe <at> octave.org>

	* ov-range.h (octave_range::valid_as_scalar_index): Ensure int value.
	(octave_range::valid_as_zero_index): Likewise.
(Continue reading)

Fredrik Bulow | 2 Oct 2004 20:35
Picon
Picon

Wrong error message

To: bug-octave <at> bevo.che.wisc.edu
Cc: fredrik.bulow <at> kvac.uu.se
Subject: Wrong error message
--------
Bug report for Octave 2.1.50 configured for i686-pc-linux-gnu

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

Wrong line and column number in error message.

Repeat-By:
---------

	1:[1:3]
Gives:
	error: invalid conversion from real matrix to real scalar
	error: colon expression elements must be scalars
	error: evaluating colon expression near line -1 column -1

Note that the line and column number are both -1 regardelss of what
line 1:[1:3] was written.	

Fix:
---
	Write the correct line and column number.

Configuration (please do not edit this section):
-----------------------------------------------

(Continue reading)

Yadin Goldschmidt | 3 Oct 2004 05:22
Picon
Favicon

A bug in plot with recent versions of octave on cygwin

After I compiled recent versionsof octave like 2.1.57 or 2.1.59 on cygwin 
1.5.11 (with --enable-
shared, --disable-static, gcc 3.3.3) I have the following "bug" when 
plotting with gnuplot. If I use e.g.
x=0:0.1:2*pi;
subplot(2,1,1)
plot(x,sin(x))
subplot(2,1,2)
plot(x,x.^2)
then after the second subplot command I have the sin(x),  plot repeats 
itself in the second frame and then the x^2 function
is plotted on top of it. The same happens with figure(1) followed by 
figure(2). This did not happen in octave 2.1.42.
Is this the expected behavior or is it a bug? The only workaround I found is 
to issue the command clearplot after the second subplot
command. But this is annoying. 

-------------------------------------------------------------
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
-------------------------------------------------------------

Dmitri A. Sergatskov | 3 Oct 2004 05:51
Picon
Favicon

Re: A bug in plot with recent versions of octave on cygwin

Yadin Goldschmidt wrote:
...
> then after the second subplot command I have the sin(x),  plot repeats 
> itself in the second frame and then the x^2 function
> is plotted on top of it. The same happens with figure(1) followed by 
> figure(2). This did not happen in octave 2.1.42.
> Is this the expected behavior or is it a bug? The only workaround I found is 
> to issue the command clearplot after the second subplot
> command. But this is annoying. 
> 

This is kind of a bug. The workaround is to set automatic_replot=0
before the plot. This change default around 2.1.49

Regards,

Dmitri.

-------------------------------------------------------------
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
-------------------------------------------------------------

David Bateman | 3 Oct 2004 14:05

Re: plot(x) kills octave when x is N-dimensional

According to John W. Eaton <jwe <at> bevo.che.wisc.edu> (on 10/01/04):
>   octave:1> x = rand (2, 3, 2);
>   octave:2> y = [1;2];
>   octave:3> [x,y]
>   panic: Segmentation fault -- stopping myself...
>   attempting to save variables to `octave-core'...
>   save to `octave-core' complete
>   Segmentation fault
> 
> I don't have a fix yet.  Perhaps David Bateman will see a quick
> solution since he has recently refactored the code that handles array
> concatenation.

Heh, this pre-dates my changes, but you didn't see the seg-fault because
it was caught later in the increment_index function and you got the error
message

error: Array<T>::insert: invalid indexing operation

With the changes I made the concatenation assumes that it is passed matrices
whose size has already been checked, and just brutally does the copying. Much
more efficient...

A patch for the problem is attached, in pt-mat.cc where the checking for the
size of the matrices is done...

Cheers
David

2004-10-03 David Bateman <dbateman <at> free.fr>
(Continue reading)

Yadin Goldschmidt | 6 Oct 2004 01:27
Picon
Favicon

Re: A bug in plot with recent versions of octave on cygwin

Actually I compiled Octave 2.1.60 on cygwin 1.5.11 but with an older version 
of gcc:
gcc 3.2-3 and now subplots appear correctly even without setting 
automatic_replot variable.
This solved also the so called "slowing" problem. The only difference is 
that previously I used
octave 2.1.59 compiled with gcc 3.3.3. I don't know which change really 
matters for solving
the subplot problem.

"Yadin Goldschmidt" <yadin <at> pitt.edu> wrote in message 
news:cjnrds$9cs$1 <at> sea.gmane.org...
> After I compiled recent versionsof octave like 2.1.57 or 2.1.59 on cygwin 
> 1.5.11 (with --enable-
> shared, --disable-static, gcc 3.3.3) I have the following "bug" when 
> plotting with gnuplot. If I use e.g.
> x=0:0.1:2*pi;
> subplot(2,1,1)
> plot(x,sin(x))
> subplot(2,1,2)
> plot(x,x.^2)
> then after the second subplot command I have the sin(x),  plot repeats 
> itself in the second frame and then the x^2 function
> is plotted on top of it. The same happens with figure(1) followed by 
> figure(2). This did not happen in octave 2.1.42.
> Is this the expected behavior or is it a bug? The only workaround I found 
> is to issue the command clearplot after the second subplot
> command. But this is annoying.
>
>
(Continue reading)


Gmane