[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #37294] interp3 fails in some cases when passi
From: |
Kris Thielemans |
Subject: |
[Octave-bug-tracker] [bug #37294] interp3 fails in some cases when passing a method argument |
Date: |
Fri, 07 Sep 2012 11:40:45 +0000 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20100101 Firefox/12.0 |
URL:
<http://savannah.gnu.org/bugs/?37294>
Summary: interp3 fails in some cases when passing a method
argument
Project: GNU Octave
Submitted by: krthie
Submitted on: Fri 07 Sep 2012 11:40:44 GMT
Category: Libraries
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Incorrect Result
Status: None
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: dev
Operating System: Any
_______________________________________________________
Details:
When the first 3 x,y,z arguments are not passed to interp3, it fails when
using a method argument:
octave:1> interp3(ones([2,2,2]), 1:2,1:2,1:2,'nearest');
error: interpn: dimensional mismatch
error: called from:
error: /usr/local/share/octave/3.6.1-rc0/m/general/interpn.m at line 135,
column 9
error: evaluating argument list element number 1
error: /usr/local/share/octave/3.6.1-rc0/m/general/interp3.m at line 105,
column 8
octave:1> [x,y,z]=meshgrid( 1:2,1:2,1:2);
interp3(ones([2,2,2]),x,y,z,'nearest');
error: interpn: wrong number or incorrectly formatted input arguments
error: called from:
error: /usr/local/share/octave/3.6.1-rc0/m/general/interpn.m at line 129,
column 5
error: evaluating argument list element number 1
error: /usr/local/share/octave/3.6.1-rc0/m/general/interp3.m at line 105,
column 8
This needs a one line fix in the code. I add a mercurial patch accordingly,
where I've also added more test cases.
I've also changed the 1st test case to make it less symmetric. In the original
version, it was using x=y which means it wasn't a very meaningful test to
compare interp3 and interpn, and in fact its calling sequence was inaccurate.
Thanks
Kris
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Fri 07 Sep 2012 11:40:44 GMT Name: octave-interp3.diff Size: 3kB By:
krthie
<http://savannah.gnu.org/bugs/download.php?file_id=26492>
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?37294>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #37294] interp3 fails in some cases when passing a method argument,
Kris Thielemans <=