RegularArray - Maple Help

ArrayTools

 RegularArray
 generate an Array of numbers with specified spacing in a given range

 Calling Sequence RegularArray(a..b, delta = d) RegularArray(a..b) RegularArray(a..b, n) RegularArray(a..b, spacing = type) RegularArray(a..b, n, spacing = type)

Parameters

 a..b - range of the numbers delta = d - (optional) spacing of the numbers generated; default spacing is linear n - (optional) number of points generated; default number of points is 100 spacing = type - (optional) type of spacing, where type is one of log or linear; default spacing is linear

Description

 • The RegularArray(a..b, delta = d) function returns numbers a, a + d, a + 2d, ..., where the last number is less or equal to b. If d = 0, or m < 0 and a < b, or m > 0 and a > b, then it returns an empty Array.
 • The RegularArray(a..b) and RegularArray(a..b, spacing = linear) functions return 100 numbers, evenly spaced between a and b, including a and b.
 • The RegularArray(a..b, n) and RegularArray(a..b, n, spacing = linear) functions return n numbers, evenly spaced between a and b, including a and b. Both functions return b if n < 2.
 • The RegularArray(a..b, spacing = log) function returns 100 numbers, logarithmically spaced between 10^a and 10^b, including 10^a and 10^b.
 • The RegularArray(a..b, n, spacing = log) function returns n numbers, logarithmically spaced between 10^a and 10^b, including 10^a and 10^b. It returns 10^b if n < 2. If b = Pi or evalhf(Pi), the function returns numbers between 10^a and evalf(Pi), including 10^a and evalf(Pi).
 • This function is part of the ArrayTools package, so it can be used in the short form RegularArray(..) only after executing the command with(ArrayTools). However, it can always be accessed through the long form of the command by using ArrayTools[RegularArray](..).

Examples

 > $\mathrm{with}\left(\mathrm{ArrayTools}\right):$
 > $\mathrm{RegularArray}\left(1..10,\mathrm{\delta }=10\right)$
 $\left[\begin{array}{c}{1.}\end{array}\right]$ (1)
 > $\mathrm{RegularArray}\left(1..100\right)$
 $\left[\begin{array}{cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc}{1.}& {2.000000000}& {3.000000000}& {4.000000000}& {5.000000000}& {6.000000000}& {7.000000000}& {8.000000000}& {9.000000000}& {10.00000000}& {11.00000000}& {12.00000000}& {13.00000000}& {14.00000000}& {15.00000000}& {16.00000000}& {17.00000000}& {18.00000000}& {19.00000000}& {20.00000000}& {21.00000000}& {22.00000000}& {23.00000000}& {24.00000000}& {25.00000000}& {26.00000000}& {27.00000000}& {28.00000000}& {29.00000000}& {30.00000000}& {31.00000000}& {32.00000000}& {33.00000000}& {34.00000000}& {35.00000000}& {36.00000000}& {37.00000000}& {38.00000000}& {39.00000000}& {40.00000000}& {41.00000000}& {42.00000000}& {43.00000000}& {44.00000000}& {45.00000000}& {46.00000000}& {47.00000000}& {48.00000000}& {49.00000000}& {50.00000000}& {51.00000000}& {52.00000000}& {53.00000000}& {54.00000000}& {55.00000000}& {56.00000000}& {57.00000000}& {58.00000000}& {59.00000000}& {60.00000000}& {61.00000000}& {62.00000000}& {63.00000000}& {64.00000000}& {65.00000000}& {66.00000000}& {67.00000000}& {68.00000000}& {69.00000000}& {70.00000000}& {71.00000000}& {72.00000000}& {73.00000000}& {74.00000000}& {75.00000000}& {76.00000000}& {77.00000000}& {78.00000000}& {79.00000000}& {80.00000000}& {81.00000000}& {82.00000000}& {83.00000000}& {84.00000000}& {85.00000000}& {86.00000000}& {87.00000000}& {88.00000000}& {89.00000000}& {90.00000000}& {91.00000000}& {92.00000000}& {93.00000000}& {94.00000000}& {95.00000000}& {96.00000000}& {97.00000000}& {98.00000000}& {99.00000000}& {100.0000000}\end{array}\right]$ (2)
 > $\mathrm{RegularArray}\left(1..100,3\right)$
 $\left[\begin{array}{ccc}{1.}& {50.50000000}& {100.0000000}\end{array}\right]$ (3)
 > $\mathrm{RegularArray}\left(1..5,\mathrm{spacing}=\mathrm{log}\right)$
 $\left[\begin{array}{cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc}{10.}& {10.97498764}& {12.04503541}& {13.21941148}& {14.50828780}& {15.92282793}& {17.47528398}& {19.17910262}& {21.04904143}& {23.10129702}& {25.35364494}& {27.82559399}& {30.53855510}& {33.51602649}& {36.78379775}& {40.37017258}& {44.30621453}& {48.62601582}& {53.36699228}& {58.57020822}& {64.28073116}& {70.54802303}& {77.42636829}& {84.97534353}& {93.26033475}& {102.3531022}& {112.3324032}& {123.2846740}& {135.3047774}& {148.4968263}& {162.9750834}& {178.8649527}& {196.3040650}& {215.4434688}& {236.4489414}& {259.5024211}& {284.8035865}& {312.5715850}& {343.0469284}& {376.4935809}& {413.2012399}& {453.4878502}& {497.7023565}& {546.2277213}& {599.4842506}& {657.9332244}& {722.0809009}& {792.4828984}& {869.7490018}& {954.5484571}& {1047.615752}& {1149.756994}& {1261.856883}& {1384.886370}& {1519.911084}& {1668.100536}& {1830.738278}& {2009.233002}& {2205.130738}& {2420.128266}& {2656.087781}& {2915.053058}& {3199.267137}& {3511.191731}& {3853.528595}& {4229.242872}& {4641.588826}& {5094.138014}& {5590.810176}& {6135.907275}& {6734.150653}& {7390.722022}& {8111.308306}& {8902.150844}& {9770.099575}& {10722.67221}& {11768.11951}& {12915.49665}& {14174.74161}& {15556.76144}& {17073.52646}& {18738.17420}& {20565.12308}& {22570.19717}& {24770.76356}& {27185.88241}& {29836.47235}& {32745.49162}& {35938.13659}& {39442.06060}& {43287.61277}& {47508.10154}& {52140.08286}& {57223.67652}& {62802.91442}& {68926.12098}& {75646.33262}& {83021.75678}& {91116.27549}& {100000.}\end{array}\right]$ (4)
 > $\mathrm{RegularArray}\left(1..5,5,\mathrm{spacing}=\mathrm{log}\right)$
 $\left[\begin{array}{ccccc}{10.}& {100.}& {1000.}& {10000.}& {100000.}\end{array}\right]$ (5)
 > $\mathrm{RegularArray}\left(1..\mathrm{\pi },3,\mathrm{spacing}=\mathrm{log}\right)$
 $\left[\begin{array}{ccc}{10.}& {5.604991217}& {3.141592654}\end{array}\right]$ (6)