On 29 May 2012 10:19, octave <oct...@duncans.org.uk> wrote:
> "fracshift" in signal-1.1.3 does not work on row vectors when the shift
> parameter is an integer.  It calls "circshift" when the shift parameter
> is an integer, but that function only shifts in the column direction.
>
> Hence the following command:
>
> fracshift([1 0 0 0],1)
>
> gives the output:
>
> [1 0 0 0]

I'm not sure what's the best way to act here and I'm CC'ing the
function author Eric Chassande-Mottin. Using a non-integer for shift
value works whether x is column or vector.

fracshift([1 0 0 0],1.5)
ans =

   0.12584   0.63632   0.63632  -0.21131

This is definetily inconsistent. However, the idea behind this
function seems to be a circshift that accepts integers. If so, then it
should behave like circshift in which case the bug would be that it
acts on x even when it's a row vector and not that it doesn't act on
it if n is an integer. Anyone has any comment?

> Also, "circshift" itself appears to be redundant, as it duplicates the
> functionality of the built-in command "shift".

circshift exists in matlab so it must be there for compatibility.
However, looking at their code, they do differ a bit and maybe it
would be easier to maintain if one was a wrapper of the other. That
however belongs to octave core, maybe you should implement a bug
report at https://savannah.gnu.org/bugs/?group=octave (or even better,
a patch).

Carnë

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Octave-dev mailing list
Octave-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/octave-dev

Reply via email to