Jim Bridgewater | 2 Apr 2009 03:51
Picon

lsode diverges for large coefficients?

bug_report was unable to send email so I've attached the generated bug report
Attachment (dead-octave-bug-1): application/octet-stream, 8 KiB
_______________________________________________
Bug-octave mailing list
Bug-octave <at> octave.org
https://www-old.cae.wisc.edu/mailman/listinfo/bug-octave
Michael D. Godfrey | 2 Apr 2009 07:11
Picon
Favicon

mesh plot does not display title

The attached script demonstrates a problem with
mesh(x,y,z):

The plot title is not displayed in the gnuplot window.
The .eps output from print() shows the title text.
The gnuplot is 4.2. patch level 3.  Octave is at
the current development level

n=100;
base=0.2;
   x = y = linspace (-base, base, n)';
   [xx, yy] = meshgrid (x, y);
   r = sqrt (xx .^ 2 + yy .^ 2);
z = -1./r;
axis([-base, base, -base, base, 0, -80])
mesh (x, y, z);
xlabel("x");
ylabel("y");
zlabel("z");
title("Conic Figure:   z = -1/sqrt(x^2 + y^2)");
_______________________________________________
Bug-octave mailing list
Bug-octave <at> octave.org
https://www-old.cae.wisc.edu/mailman/listinfo/bug-octave
Ben Abbott | 2 Apr 2009 10:49
Picon
Gravatar

Re: mesh plot does not display title


On Apr 2, 2009, at 1:11 AM, Michael D. Godfrey wrote:

> The attached script demonstrates a problem with
> mesh(x,y,z):
>
> The plot title is not displayed in the gnuplot window.
> The .eps output from print() shows the title text.
> The gnuplot is 4.2. patch level 3.  Octave is at
> the current development level
>
> n=100;
> base=0.2;
>   x = y = linspace (-base, base, n)';
>   [xx, yy] = meshgrid (x, y);
>   r = sqrt (xx .^ 2 + yy .^ 2);
> z = -1./r;
> axis([-base, base, -base, base, 0, -80])
> mesh (x, y, z);
> xlabel("x");
> ylabel("y");
> zlabel("z");
> title("Conic Figure:   z = -1/sqrt(x^2 + y^2)");

Michael,

Please try that attached changeset.

Ben

(Continue reading)

Ben Abbott | 2 Apr 2009 10:52
Picon
Gravatar

Re: mesh plot does not display title


On Apr 2, 2009, at 1:11 AM, Michael D. Godfrey wrote:

> The attached script demonstrates a problem with
> mesh(x,y,z):
>
> The plot title is not displayed in the gnuplot window.
> The .eps output from print() shows the title text.
> The gnuplot is 4.2. patch level 3.  Octave is at
> the current development level
>
> n=100;
> base=0.2;
>   x = y = linspace (-base, base, n)';
>   [xx, yy] = meshgrid (x, y);
>   r = sqrt (xx .^ 2 + yy .^ 2);
> z = -1./r;
> axis([-base, base, -base, base, 0, -80])
> mesh (x, y, z);
> xlabel("x");
> ylabel("y");
> zlabel("z");
> title("Conic Figure:   z = -1/sqrt(x^2 + y^2)");

opps ... try this one instead. The last attachment has an extra space  
appended to the file name.

Attachment (changeset-title.patch): application/octet-stream, 1226 bytes
(Continue reading)

Olaf Till | 2 Apr 2009 13:12
Picon
Picon
Favicon

Re: lsode diverges for large coefficients?

Sorry, I lost the original mail and cannot reply directly.

> The ODE solver lsode seems to diverge for large values of k in
> equations of the form
> 
> x'' = kx
> 
> even when the initial conditions are specified such that the solution
> is a constant (eg x(0) = 100 and x'(0) = 0).
> 

These initial conditions can not give a constant solution, use [0; 0]
for that. lsode does not produce constant solutions in _both_ cases
below, maybe you have mistaken the first solution for constant due to
setting the y axis range in the plot --- look at the raw values after
"format long".

> 
> Repeat-By:
> ---------
> 
> % 4/1/2009 Jim Bridgewater (jwbwater <at> gmail.com)
> % Octave bug report
> 
> % Keep octave from complaining about function statement at the
> % beginning of a script file
> dummy = 5; 
> 
> % setup the differential equations to produce correct output
> % c'' = 1e3 * c
(Continue reading)

Ben Abbott | 3 Apr 2009 02:54
Picon
Gravatar

Re: mesh plot does not display title


On Apr 2, 2009, at 4:52 AM, Ben Abbott wrote:

>
> On Apr 2, 2009, at 1:11 AM, Michael D. Godfrey wrote:
>
>> The attached script demonstrates a problem with
>> mesh(x,y,z):
>>
>> The plot title is not displayed in the gnuplot window.
>> The .eps output from print() shows the title text.
>> The gnuplot is 4.2. patch level 3.  Octave is at
>> the current development level
>>
>> n=100;
>> base=0.2;
>>  x = y = linspace (-base, base, n)';
>>  [xx, yy] = meshgrid (x, y);
>>  r = sqrt (xx .^ 2 + yy .^ 2);
>> z = -1./r;
>> axis([-base, base, -base, base, 0, -80])
>> mesh (x, y, z);
>> xlabel("x");
>> ylabel("y");
>> zlabel("z");
>> title("Conic Figure:   z = -1/sqrt(x^2 + y^2)");
>
> opps ... try this one instead. The last attachment has an extra  
> space appended to the file name.
>
(Continue reading)

Diana Fries | 3 Apr 2009 01:52
Picon

function mean

Hi,

I found a difference between between Octave and Matlab.
My Octave version is 3.0.1.

In the function 'mean' it is not possible to calculate the mean of a 
complex matrix with Octave, in Matlab it is possible.

Example code:
a=[j,1,1+j];
mean(a);

In Matlab the result is 0.6667+0.6667i.

In Octave the following error message is displayed.
error: octave_base_value::array_value(): wrong type argument `complex
matrix'
error: sumskipnan: first input argument must be a real matrix
error: evaluating if command near line 72, column 1
error: called from `mean' in file 
`/usr/share/octave/packages/nan-1.0.6/mean.m'

Regards
Diana
Jaroslav Hajek | 3 Apr 2009 07:14
Picon

Re: function mean

On Fri, Apr 3, 2009 at 1:52 AM, Diana Fries <diana.fries <at> gmx.net> wrote:
> Hi,
>
>
> I found a difference between between Octave and Matlab.
> My Octave version is 3.0.1.
>
> In the function 'mean' it is not possible to calculate the mean of a
> complex matrix with Octave, in Matlab it is possible.
>

It is also possible in Octave. What you see is a bug in an additional
package, that shadows Octave's own function. So blame the author. Try
"pkg rebuild -noauto nan", that should fix your problem.

cheers

--

-- 
RNDr. Jaroslav Hajek
computing expert & GNU Octave developer
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz
Michael D. Godfrey | 3 Apr 2009 08:52
Picon
Favicon

Re: mesh plot does not display title

> try this one instead. The last attachment has an extra space appended 
> to the file name.
>
> <changeset-title.patch>
>
> I pushed this change.
Works for me.

Thanks,
Michael
Stefan Gustavson | 3 Apr 2009 15:08
Picon

imresize incorrectly clips output to [0,1]

Bug report for Octave 3.0.3 configured for i686-pc-msdosmsvc

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

The function imresize(img, [w h], interp), when using double input,
incorrectly clips its output to the range [0,1]. This is both wrong and
inconsistent with what Matlab does. Many image processing applications
use a wider range of values than [0,1]. Negative values are only to be
disallowed in images representing pictures, and even those have no
inherent upper limit. Clipping to a certain range is an issue with image
file formats with a limited precision and range (e.g. 8-bit samples),
not with the image data as such.

If arbitrary clipping to [0,1] is performed for any other image
processing functions, they need to be fixed as well. I am sorry,
but I have not found the time to check the entire "image" package.

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

img = 10*(rand([64, 64])-0.5); % Range of img is [-5, 5]
img2 = imresize(img, [64, 64]); % Essentially a no-op
% Range of img2 is clipped to [0,1], as demonstrated by:
min(img2(:))
max(img2(:))

Fix:
---

(Continue reading)


Gmane