-
To make a new array of real with evenly spaced values use createarray.
set b to createarray 41 range {-10, 10}
b as list of real
-- {-10.0, -9.5, -9.0, etc.}
-
To display the content of an array of real by script, use the display command, which makes an array of real into a human-readable text. Then, use for instance quietmsg to print the string to the Console.
set b to createarray 41 range {-10, 10}
set s to display y
quietmsg(s)
-
To view rapidly an array of real use QuickCurve or QuickScatter.
QuickCurve(0, b, 0)
set c to randomarray 1000 range {-pi, pi}
QuickScatter(0, c, 0)
Import script
-
AppleScript cannot display NAN’s. When you coerce an array of
real into a list of real numbers the NAN’s are translated into the
special quantity missing value.
set a to {0, pi} as array of real
(asin a) as list of real
-- {0.0, missing value}
-
To get the size of an array of real use count like with a regular list.
count b
-- 41
-
The mathematical functions defined in the Satimage osax work on numbers,
on lists of real and on arrays of real.
set d to cos b
d as list of real
-- {-0.839071529076, -0.997172156196, etc.}
|
QuickCurve
QuickScatter
|