[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #49019] some function fail when DIM>=3 and siz
From: |
anonymous |
Subject: |
[Octave-bug-tracker] [bug #49019] some function fail when DIM>=3 and size(X, DIM)==1 |
Date: |
Wed, 7 Sep 2016 08:55:56 +0000 (UTC) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0 |
URL:
<http://savannah.gnu.org/bugs/?49019>
Summary: some function fail when DIM>=3 and size(X,DIM)==1
Project: GNU Octave
Submitted by: None
Submitted on: Wed 07 Sep 2016 08:55:53 AM UTC
Category: Octave Function
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: None
Status: None
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: 4.0.3
Operating System: Any
_______________________________________________________
Details:
When DIM>=3 and size(X,DIM)==1, some functions work, such as "max", "min",
"sum", "prod",
>> max(1:3, [], 3)
ans =
1 2 3
>> sum(1:3, 3)
ans =
1 2 3
but some functions fail, such as "fft", "mean", "diff",
>> fft(1:3, 256, 3)
error: fft: DIM must be a valid dimension along which to perform FFT
>> fft(1:3, [], 3)
error: fft: DIM must be a valid dimension along which to perform FFT
>> diff(1:3, [], 3)
error: DIM must be a valid dimension
>> mean(1:3, 3)
error: mean: DIM must be an integer and a valid dimension
error: called from
mean at line 110 column 7
I'm not sure whether this is a bug or a feature,
although sometimes this is inconvenient and we have to make a workaround by
"resize" or "postpad" X to make sure size(X,DIM)>=2 before calling these
functions.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?49019>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #49019] some function fail when DIM>=3 and size(X, DIM)==1,
anonymous <=