[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #63950] trapz error with empty inputs
From: |
Chad Oldfield |
Subject: |
[Octave-bug-tracker] [bug #63950] trapz error with empty inputs |
Date: |
Tue, 21 Mar 2023 11:19:00 -0400 (EDT) |
URL:
<https://savannah.gnu.org/bugs/?63950>
Summary: trapz error with empty inputs
Group: GNU Octave
Submitter: chadoldfield
Submitted: Tue 21 Mar 2023 03:18:58 PM UTC
Category: Octave Function
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Unexpected Error or Warning
Status: None
Assigned to: None
Originator Name: Chad Oldfield
Originator Email:
Open/Closed: Open
Release: 7.1.0
Discussion Lock: Any
Operating System: Microsoft Windows
Fixed Release: None
Planned Release: None
_______________________________________________________
Follow-up Comments:
-------------------------------------------------------
Date: Tue 21 Mar 2023 03:18:58 PM UTC By: Chad Oldfield <chadoldfield>
The trapz function sometimes gives errors when the input parameters are empty.
This depends on specifically how the parameters are defined. The below shows
this for inputs that are 0x0 and 1x0. I would expect the trapz result to be 0
in all cases.
octave:1> version
ans = 7.1.0
octave:2> a = []
a = [](0x0)
octave:3> b = 1:0
b = [](1x0)
octave:4> trapz(a,a)
ans = 0
octave:5> trapz(a,b)
error: trapz: X and Y must have same shape
error: called from
trapz at line 126 column 7
octave:6> trapz(b,a)
ans = 0
octave:7> trapz(b,b)
error: trapz: length of X and length of Y along DIM must match
error: called from
trapz at line 117 column 7
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?63950>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #63950] trapz error with empty inputs,
Chad Oldfield <=
- [Octave-bug-tracker] [bug #63950] trapz error with empty inputs, Dmitri A. Sergatskov, 2023/03/21
- [Octave-bug-tracker] [bug #63950] trapz error with empty inputs, Nicholas Jankowski, 2023/03/21
- [Octave-bug-tracker] [bug #63950] trapz error with empty inputs, Nicholas Jankowski, 2023/03/21
- [Octave-bug-tracker] [bug #63950] trapz error with empty inputs, Dmitri A. Sergatskov, 2023/03/21
- [Octave-bug-tracker] [bug #63950] trapz error with empty inputs, Chad Oldfield, 2023/03/21
- [Octave-bug-tracker] [bug #63950] trapz inconsistent results and error messages with empty inputs, Nicholas Jankowski, 2023/03/21
- [Octave-bug-tracker] [bug #63950] trapz inconsistent results and error messages with empty inputs, Rik, 2023/03/21
- [Octave-bug-tracker] [bug #63950] trapz inconsistent results and error messages with empty inputs, Chad Oldfield, 2023/03/22