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

Online Help

All Products    Maple    MapleSim


LinearAlgebra[Modular]

  

Fill

  

fill mod m Matrix or Vector with specified value

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

Fill(m, fillv, A)

Parameters

m

-

modulus

fillv

-

(optional) fill value; numeric in the range 0..m1 or keyword

A

-

mod m Matrix or Vector, including subspec

Description

• 

The Fill function fills the mod m Matrix or Vector A with the specified value fillv. If a fill value, fillv, is not specified, 0 is used.  The value NULL is returned.

  

If fillv is the keyword random, the mod m Matrix or Vector A is filled with random values in the range 0..m1.

• 

The Fill function allows you to use sub-Matrix and sub-Vector specifications for the mod m Matrix or Vector. For example, the function can be used to clear specific rows of a Matrix, or part of a Vector.

• 

This command is part of the LinearAlgebra[Modular] package, so it can be used in the form Fill(..) only after executing the command with(LinearAlgebra[Modular]).  However, it can always be used in the form LinearAlgebra[Modular][Fill](..).

Examples

withLinearAlgebraModular:

AMod13,Matrix4,4,i,jrand,integer

A10081226011921174111211

(1)

Fill entire Matrix with 0.

Fill13,A:

A

0000000000000000

(2)

Fill row 3 with value 2.

Fill13,2,A,3:

A

0000000022220000

(3)

Fill column 2 with 0.

Fill13,A,1..1,2:

A

0000000020220000

(4)

Fill all but first and last elements of a row Vector with 5.0.

BCreate13,0,5,float8

B0.0.0.0.0.

(5)

Fill13,5.0,B,2..2:

B

0.5.5.5.0.

(6)

Fill Matrix with random values.

A

0000000020220000

(7)

Fill13,random,A:

A

67731036610127612011

(8)

See Also

LinearAlgebra/Details

LinearAlgebra[Modular]

LinearAlgebra[Modular][Copy]

LinearAlgebra[Modular][Create]

LinearAlgebra[Modular][subspec]