[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #59403] integral2 and quad2d functions do not
From: |
Luis Kao |
Subject: |
[Octave-bug-tracker] [bug #59403] integral2 and quad2d functions do not catch incorrect dimensions for matrix multiplication |
Date: |
Tue, 3 Nov 2020 01:15:15 -0500 (EST) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36 |
URL:
<https://savannah.gnu.org/bugs/?59403>
Summary: integral2 and quad2d functions do not catch
incorrect dimensions for matrix multiplication
Project: GNU Octave
Submitted by: kogiokka
Submitted on: Tue 03 Nov 2020 06:15:14 AM UTC
Category: Octave Function
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Missed Error or Warning
Status: None
Assigned to: None
Originator Name: Luis Kao
Originator Email:
Open/Closed: Open
Release: 5.2.0
Discussion Lock: Any
Operating System: GNU/Linux
_______________________________________________________
Details:
Octave silently produces an "incorrect" result when the input function F does
not use element-by-element multiplication. This behavior is different from
MATLAB, which throws the error message:
```
Error using *
Incorrect dimensions for matrix multiplication. Check that the number of
columns in the first matrix matches the number of rows in the second matrix.
To perform elementwise multiplication, use '.*'.
```
== Example Script ==
f = @(x, y) sinc(x) * sinc(y);
integral2(f, -1, 1, -1, 1)
=> 12.32805347760951
f = @(x, y) sinc(x) .* sinc(y);
integral2(f, -1, 1, -1, 1)
=> 1.389993237875656
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?59403>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #59403] integral2 and quad2d functions do not catch incorrect dimensions for matrix multiplication,
Luis Kao <=
- [Octave-bug-tracker] [bug #59403] integral2 and quad2d functions do not catch incorrect dimensions for matrix multiplication, Rik, 2020/11/03
- [Octave-bug-tracker] [bug #59403] integral2 and quad2d functions do not catch incorrect dimensions for matrix multiplication, John W. Eaton, 2020/11/03
- [Octave-bug-tracker] [bug #59403] integral2 and quad2d functions do not catch incorrect dimensions for matrix multiplication, Rik, 2020/11/05
- [Octave-bug-tracker] [bug #59403] integral2 and quad2d functions do not catch incorrect dimensions for matrix multiplication, Luis Kao, 2020/11/05
- [Octave-bug-tracker] [bug #59403] integral2 and quad2d functions do not catch incorrect dimensions for matrix multiplication, Rik, 2020/11/05
- [Octave-bug-tracker] [bug #59403] integral2 and quad2d functions do not accurately document form of integrand function F, Rik, 2020/11/05
- [Octave-bug-tracker] [bug #59403] integral2 and quad2d functions do not accurately document form of integrand function F, David Bateman, 2020/11/12
- [Octave-bug-tracker] [bug #59403] integral2 and quad2d functions do not accurately document form of integrand function F, Luis Kao, 2020/11/14
- [Octave-bug-tracker] [bug #59403] integral2 and quad2d functions do not accurately document form of integrand function F, Luis Kao, 2020/11/14
- [Octave-bug-tracker] [bug #59403] integral2 and quad2d functions do not accurately document form of integrand function F, John W. Eaton, 2020/11/14