octave-bug-tracker
[Top][All Lists]
Advanced

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]