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 13:02:33 -0400 (EDT)

Follow-up Comment #5, bug #63950 (project octave):

[comment #3 comment #3:]
> also, note that integrating a zero-valued function should give you 0. 
integrating an empty input is not the same thing, and shouldn't necessarily
give zero. I would more expect an undefined, NaN, or empty answer. 

This is a good point, and thanks also for the earlier MATLAB comparison. 
Together, it leaves one wondering why Mathworks chose 0-valued returns for
some of the cases.

Overall, the user code calling trapz could certainly do its own handling of
empty inputs to avoid this altogether (mine previously relied on the zero
values returned by Octave version 3.6.4).


    _______________________________________________________

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]