makearray()
Creates an array of real, complex or string values
Syntax
makearray(Type, A1, A2..)
| Name | Description | Range | Type | Required |
|---|---|---|---|---|
| Type | array type 1:real, 2:complex or 3:string | [1, 3] | integer | yes |
| A1,A2, . | Values in the array | (-∞, ∞) | real, complex or string | yes |
| Array | Array from which the sub-array is to be created | real, complex or string array | yes | |
| StartIndex | Start index of the array | [1, ∞) | integer | yes |
| StopIndex | Stop index of the array | [1, ∞) | integer | yes |
Examples
rA = makearray(1, 1, 2.0, 3.0)
returns an array of three real numbers
cA = makearray(2, 2, 1+j*1, 2+j*2)
returns an array of three complex numbers
sA = makearray(3, "One", "Two")
returns an array of 2 strings
sub_A = makearray(rA, 1, 2)
returns a sub-array containing (1.0, 2.0)
See Also
get_array_size(), length(), list(), scalearray()
Notes/Equations
This function creates an array of real, complex, or string data type. There are two ways that the function can be used.
- In the first syntax listed above, the individual entries in the array are specified. The array must have a minimum of one value. In a real array, the values can either be integers or real. In this case, the returned array is of type real. In a complex array, the individual array entries can be integer, real, or complex. In this case, an array with complex data type is created.
- In addition to the syntax mentioned above, the following syntax can also be used to extract a subarray out of an existing array.
makearray(Array, StartIndex, StopIndex)
In this case, the StartIndex must be greater than 1 and less than or equal to the number of entries in the existing array.
Privacy
Statement
|
Terms of Use
|
Legal |
Contact Us
|
© Agilent 2000-2008 ![]()