Logarithmic interval

I would like to check several intensity values.

I need them to be delayed logarithmically from 1 to 1000. But I just use 1, 10, 100, 1000, but I would like to have more data, say 10.

How to find 10 logarithmically spaced numbers from 1 to 1000 in Mathematica?

+4
source share
3 answers

If a running, c is the end, and b is the number of intervals:

 {a, b, c} = {1, 10, 1000}; t = (c/a)^(1/b) // N a*t^Range[b] 1.99526 {1.99526, 3.98107, 7.94328, 15.8489, 31.6228, 63.0957, 125.893, 251.189, 501.187, 1000.} 

I used N to better see what we have.

+17
source

Here is one way:

 In[11]:= base = Block[{a}, a /. NSolve[a^9 == 1000, a][[-1, 1]]] Out[11]= 2.15443 In[13]:= base^Range[0, 9] Out[13]= {1., 2.15443, 4.64159, 10., 21.5443, 46.4159, 100., 215.443,464.159, 1000.} 

EDIT

Here is a much shorter and more direct way to get the same:

 In[18]:= N[10^Range[0, 3, 1/3]] Out[18]= {1., 2.15443, 4.64159, 10., 21.5443, 46.4159, 100., 215.443, 464.159, 1000.} 
+7
source

Solve the equation x ** 9 = 1000 - then your numbers are: x ** 0 , x ** 1 , ... x ** 9 .

note: where x ** y means x for power y

+4
source

All Articles