Re: Bug in PadLeft/PadRight
- To: mathgroup at smc.vnet.net
- Subject: [mg109254] Re: Bug in PadLeft/PadRight
- From: David Bailey <dave at removedbailey.co.uk>
- Date: Mon, 19 Apr 2010 02:50:24 -0400 (EDT)
- References: <hpkgkn$817$1@smc.vnet.net> <hputql$lhs$1@smc.vnet.net> <hq0msf$k3s$1@smc.vnet.net>
Steve Luttrell wrote:
> In the documentation for PadRight it says:
>
> "With padding {Subscript[x, 1],Subscript[x, 2],\[Ellipsis],Subscript[x, s]}
> cyclic repetitions of the Subscript[x, i] are effectively laid down and then
> the list is superimposed on top of them, with the first element of the list
> lying on an occurrence of Subscript[x, 1]."
>
> That means your example PadRight[{y4, x1, x2, x3, x4}, 6, {y1, y2, y3, y4}]
> works correctly.
>
Yes - I agree - my mistake - and indeed this form of padding is probably
the most useful.
David Bailey
http://www.dbaileyconsultancy.co.uk