On Tue, 29 May 2012, Carnë Draug wrote:

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]

this is compatible with what Matlab does:

circshift([1 0 0 0],1)

ans =

     1     0     0     0

circshift([1 0 0 0]',1)

ans =

     0
     1
     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.

fracshift's behavior is inconsistent to circshift's but there is no equivalent on the Matlab side. I personally find not very practical that shifts are applied to column vectors only. if consistency is preferred, the latter requirement should be easy to implement.

cheers,
eric
------------------------------------------------------------------------------
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