RandomTools Flavor: Vector - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : Random Objects : RandomTools package : Flavors : RandomTools/flavor/Vector

RandomTools Flavor: Vector

describe a Vector of random objects

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

'Vector'(flav, n, ... )

'Vector[o]'(flav, n, ... )

Parameters

flav

-

random flavor

n

-

positive integer or a flavor that generates a positive integer

density

-

a numeric value with 0 <= density <= 1

[o]

-

use either [row] or [column] to specify the orientation of the resulting Vector

...

-

additional options to the Vector constructor

Description

• 

The flavor 'Vector' describes a Vector with n rows (or columns).  Each entry is described by the given random flavor flav.  The default flavor is integer and the default value for n is 10.

• 

Specifying [row] or [column] will select if a row or column Vector is generated.  By default, a column vector is generated.

• 

The density value is a probability that an entry will be assigned a value.  By default, this value is 1.

• 

Additional arguments can be specified that will be passed to the Vector constructor.  For example, datatype, shape,etc.

  

This flavor can be used as an argument to RandomTools[Generate] or as part of a structured flavor.

Examples

withRandomTools&colon;

Generate&apos;Vector&apos;integer&comma;3

276532064796459444310976100885603451

(1)

Generate&apos;Vector&apos;rationaldenominator&equals;30&comma;2

45215

(2)

HGenerate&apos;Vector&apos;floatmethod&equals;uniform&comma;range&equals;0..10&comma;5&comma;datatype&equals;float&lsqb;8&rsqb;

H:=9.575068354342985.468815192049842.784982188670480.9754040499940956.32359246225410

(3)

HGenerate&apos;Vector&lsqb;row&rsqb;&apos;floatrange&equals;0..10&comma;method&equals;uniform&comma;5&comma;datatype&equals;float&lsqb;8&rsqb;

H:=4.853756487228419.571669482429469.705927817606161.576130816775489.64888535199277

(4)

Compatibility

• 

The RandomTools Flavor: Vector command was introduced in Maple 18.

• 

For more information on Maple 18 changes, see Updates in Maple 18.

See Also

flavor/structured

rand

RandomTools

RandomTools[Generate]

Vector

 


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam