[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #51728] del2 fails on 1-D input with a vector
From: |
Roger Jeurissen |
Subject: |
[Octave-bug-tracker] [bug #51728] del2 fails on 1-D input with a vector as spacing |
Date: |
Thu, 17 Aug 2017 08:19:39 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:55.0) Gecko/20100101 Firefox/55.0 |
Follow-up Comment #3, bug #51728 (project octave):
The Matlab documentation for del2 is indeed incorrect here. I said that the
example code that I gave works in Matlab, because it came directly from the
example on the Mathworks website. I assume that they checked their examples. I
don't have access to Matlab right now.
Your suggestion of supplying a spacing for the y-direction is actually much
simpler than what I proposed. I assumed that that wouldn't work because the
doc says:
At least 3 data points are needed for each dimension.
This solution relies on what happens when there are fewer than 3 data points;
that dimension is ignored, so it works. This could be implemented by adding
this right after line 80 ( which is h = varargin{1}; )
if(nd==2&&xor(sz(1)==1,sz(2)==1)&&xor(sz(1)>1,sz(2)>1))
h_new{sz>1}=1;
h_new{sz==1}=h;
D=del2(M,h_new{:});
return
endif
I just noticed that circshift has the same issue.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?51728>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #51728] del2 fails on 1-D input with a vector as spacing, anonymous, 2017/08/11
- [Octave-bug-tracker] [bug #51728] del2 fails on 1-D input with a vector as spacing, Rik, 2017/08/11
- [Octave-bug-tracker] [bug #51728] del2 fails on 1-D input with a vector as spacing, Rik, 2017/08/11
- [Octave-bug-tracker] [bug #51728] del2 fails on 1-D input with a vector as spacing, Rik, 2017/08/15
- [Octave-bug-tracker] [bug #51728] del2 fails on 1-D input with a vector as spacing,
Roger Jeurissen <=
- [Octave-bug-tracker] [bug #51728] del2 fails on 1-D input with a vector as spacing, Roger Jeurissen, 2017/08/17
- [Octave-bug-tracker] [bug #51728] del2 fails on 1-D input with a vector as spacing, Guillaume, 2017/08/24
- [Octave-bug-tracker] [bug #51728] del2 fails on 1-D input with a vector as spacing, Rik, 2017/08/25
- [Octave-bug-tracker] [bug #51728] del2 fails on 1-D input with a vector as spacing, Rik, 2017/08/25
- [Octave-bug-tracker] [bug #51728] del2 fails on 1-D input with a vector as spacing, Rik, 2017/08/25