ArrayTools
RegularArray
generate an Array of numbers with specified spacing in a given range
Calling Sequence
Parameters
Description
Examples
RegularArray(a..b, delta = d)
RegularArray(a..b)
RegularArray(a..b, n)
RegularArray(a..b, spacing = type)
RegularArray(a..b, n, spacing = type)
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
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](..).
with⁡ArrayTools:
RegularArray⁡1..10,δ=10
1.
RegularArray⁡1..100
1.2.0000000003.0000000004.0000000005.0000000006.0000000007.0000000008.0000000009.00000000010.0000000011.0000000012.0000000013.0000000014.0000000015.0000000016.0000000017.0000000018.0000000019.0000000020.0000000021.0000000022.0000000023.0000000024.0000000025.0000000026.0000000027.0000000028.0000000029.0000000030.0000000031.0000000032.0000000033.0000000034.0000000035.0000000036.0000000037.0000000038.0000000039.0000000040.0000000041.0000000042.0000000043.0000000044.0000000045.0000000046.0000000047.0000000048.0000000049.0000000050.0000000051.0000000052.0000000053.0000000054.0000000055.0000000056.0000000057.0000000058.0000000059.0000000060.0000000061.0000000062.0000000063.0000000064.0000000065.0000000066.0000000067.0000000068.0000000069.0000000070.0000000071.0000000072.0000000073.0000000074.0000000075.0000000076.0000000077.0000000078.0000000079.0000000080.0000000081.0000000082.0000000083.0000000084.0000000085.0000000086.0000000087.0000000088.0000000089.0000000090.0000000091.0000000092.0000000093.0000000094.0000000095.0000000096.0000000097.0000000098.0000000099.00000000100.0000000
RegularArray⁡1..100,3
1.50.50000000100.0000000
RegularArray⁡1..5,spacing=log
10.10.9749876412.0450354113.2194114814.5082878015.9228279317.4752839819.1791026221.0490414323.1012970225.3536449427.8255939930.5385551033.5160264936.7837977540.3701725844.3062145348.6260158253.3669922858.5702082264.2807311670.5480230377.4263682984.9753435393.26033475102.3531022112.3324032123.2846740135.3047774148.4968263162.9750834178.8649527196.3040650215.4434688236.4489414259.5024211284.8035865312.5715850343.0469284376.4935809413.2012399453.4878502497.7023565546.2277213599.4842506657.9332244722.0809009792.4828984869.7490018954.54845711047.6157521149.7569941261.8568831384.8863701519.9110841668.1005361830.7382782009.2330022205.1307382420.1282662656.0877812915.0530583199.2671373511.1917313853.5285954229.2428724641.5888265094.1380145590.8101766135.9072756734.1506537390.7220228111.3083068902.1508449770.09957510722.6722111768.1195112915.4966514174.7416115556.7614417073.5264618738.1742020565.1230822570.1971724770.7635627185.8824129836.4723532745.4916235938.1365939442.0606043287.6127747508.1015452140.0828657223.6765262802.9144268926.1209875646.3326283021.7567891116.27549100000.
RegularArray⁡1..5,5,spacing=log
10.100.1000.10000.100000.
RegularArray⁡1..π,3,spacing=log
10.5.6049912173.141592654
See Also
ArrayTools[RandomArray]
ArrayTools[Size]
rtable_indexing
Download Help Document