PadRight - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

# Online Help

###### All Products    Maple    MapleSim

MmaTranslator[Mma]

 PadRight
 return a list with zeros on the right

 Calling Sequence PadRight(arguments)

Parameters

 arguments - Maple translation of the Mathematica command arguments

Description

 • The PadRight command returns a list of a specified length padding the list with zeros on the right.

Examples

 > $\mathrm{with}\left({\mathrm{MmaTranslator}}_{\mathrm{Mma}}\right):$

Use the command with the Maple translation.

 > $\mathrm{PadRight}\left(\left[a,b,c,d,e\right],9\right)$
 $\left[{a}{,}{b}{,}{c}{,}{d}{,}{e}{,}{0}{,}{0}{,}{0}{,}{0}\right]$ (1)

Alternatively, you can use the FromMma command with the evaluate option specified.

 > $\mathrm{with}\left(\mathrm{MmaTranslator}\right):$
 > $\mathrm{FromMma}\left(\mathrm{PadRight\left[\left\{a, b, c, d, e\right\}, 9\right]},\mathrm{evaluate}\right)$
 $\left[{a}{,}{b}{,}{c}{,}{d}{,}{e}{,}{0}{,}{0}{,}{0}{,}{0}\right]$ (2)

 See Also