2.39 generates equally spaced N points between \(x_1\) and \(x_2\)
| Mathematica
x1=1;
x2=3;
FindDivisions[{x1,x2},5]
|
Out[48]= {1,3/2,2,5/2,3}
N[%]
Out[49]= {1.,1.5,2.,2.5,3.}
|
| Matlab
clear all;
x1 = 1;
x2 = 3;
linspace(x1,x2,5)
|
ans =
1.0000 1.5000 2.0000 2.5000 3.0000
|
| Maple
x1 := 1; x2 := 3;
ArrayTools:-RegularArray(x1..x2,5)
|
Vector[row](5, [1.0000, 1.5000, 2.0000, 2.5000, 3.0000])
|