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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #59403] integral2 and quad2d functions do not


From: Rik
Subject: [Octave-bug-tracker] [bug #59403] integral2 and quad2d functions do not catch incorrect dimensions for matrix multiplication
Date: Thu, 5 Nov 2020 11:20:32 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.75 Safari/537.36

Follow-up Comment #3, bug #59403 (project octave):

This is what I suspected.  It was more or less luck, an artifact of how Matlab
implements integral2, that led to the warning.  In Octave, I think the
underlying implementation is trying for better performance so instead of
calling the integrand function 15x15 = 225 times and incurring the overhead of
a function call it calls the integrand once with a meshgrid 15x15 input.

Note, that Matlab's own documentation says the integrand function must use
element-wise operators.


Integrand, specified as a function handle, defines the function to be
integrated over the planar region xmin ≤ x ≤ xmax and ymin(x) ≤ y ≤
ymax(x). The function fun must accept two arrays of the same size and return
an array of corresponding values. It must perform element-wise operations.


My leaning is to treat this bug as a documentation issue and more specifically
mention that the function must return an array and use element-wise operators.

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?59403>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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