0
$\begingroup$

Is it possible to use the Table function with growing steps? In other words, as the function proceeds it takes larger steps.

The intention is to have a set of data with unequal distribution in which it has more density in the beginning and as it reaches the end the time steps become larger. Imagine something like this figure.

enter image description here

Thanks in advance

$\endgroup$
  • $\begingroup$ Is there a function to generate those steps? $\endgroup$ – Αλέξανδρος Ζεγγ Apr 20 '18 at 13:14
  • $\begingroup$ It only depends on the function which you use inside Table, as in Table[func, {i,imax}]. What kind of function/distribution do you need? $\endgroup$ – Theo Tiger Apr 20 '18 at 13:15
  • $\begingroup$ If you know the dicretisation, you might use Table[...,{x,{x0,x1,...,xn}}] $\endgroup$ – Ulrich Neumann Apr 20 '18 at 13:20
  • $\begingroup$ f[x_] = 5 x; ListLinePlot[Table[{x, f[x]}, {x, 2^Range[-1, 5]}], PlotMarkers -> {Automatic, 10}, AspectRatio -> 1] $\endgroup$ – Bob Hanlon Apr 20 '18 at 13:21
  • $\begingroup$ @TheoTiger This is actually a part of my question. I need a nonlinear distribution $\endgroup$ – KratosMath Apr 20 '18 at 13:22
1
$\begingroup$

Adopting @ChrisK idea.

f[x_] := x;

da = With[{x := E^xp - 1}, Table[{x, f[x]}, {xp, 0, 5}]]

ListLinePlot[da, Epilog -> {Red, PointSize[Large], Point[da]}]

enter image description here

$\endgroup$
  • $\begingroup$ Thanks!! thats it. $\endgroup$ – KratosMath Apr 20 '18 at 13:28

Not the answer you're looking for? Browse other questions tagged or ask your own question.