Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/logging/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/react-native/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Wolfram mathematica 对数间隔数_Wolfram Mathematica_Logging_Mathematica 8 - Fatal编程技术网

Wolfram mathematica 对数间隔数

Wolfram mathematica 对数间隔数,wolfram-mathematica,logging,mathematica-8,Wolfram Mathematica,Logging,Mathematica 8,我想测试几个强度值 我需要它们在1到1000之间以对数间隔。然而,我只使用了1,10,100,1000,但我希望有更多的数据点,比如说10 我如何在Mathematica中找到10个1到1000之间的对数间隔数?解方程x**9=1000——那么你的数字是:x**0,x**1x**9 注:其中x**y表示x与y的幂之比: In[11]:= base = Block[{a}, a /. NSolve[a^9 == 1000, a][[-1, 1]]] Out[11]= 2.15443 In[13]

我想测试几个强度值

我需要它们在1到1000之间以对数间隔。然而,我只使用了1,10,100,1000,但我希望有更多的数据点,比如说10


我如何在Mathematica中找到10个1到1000之间的对数间隔数?解方程
x**9=1000
——那么你的数字是:
x**0
x**1
<代码>x**9

注:其中
x**y
表示
x
y

的幂之比:

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.}
编辑

下面是一个更简短、更直接的方法:

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.}

如果
a
为开始,
c
为结束,
b
为间隔数:

{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.}

我使用
N
只是为了看得更清楚,我们有什么。

谢谢你,莱昂尼德,你能解释一下“Block”、“/”和好奇的“[-1,1]]”的用法吗。它可以工作,但我还不能掌握语法。@500我认为仅仅使用
NSolve[a^9==1000,a,Reals]
就更清楚了。除了
Block
之外,还可以使用同样的成功:
base=\[FormalA]/.NSolve[\[FormalA]^9==1000,\[FormalA],Reals]//First
。“
/。
”只是。@500我想,只要使用
base=N[Power[1000,1/9]]]
就容易多了。实际上,
base
10
的立方根。不知道我在想什么,谢谢!我其实是在调查这件事。但无法找到如何得到第n个根。你把这个问题回答为:幂和分数!我本来想发布一些非常类似的东西,但你比我快了2秒。顺便说一句,
Power
Listable
的,所以你只需做
a*t^Range[b]
@Heike,很好!更新。我在RSS发布30分钟后发现了这个问题。这是我的第一个Mathematica答案,所以我试着快点。。P@Nakilon您可以像Leonid那样使用
范围[0,b]
a
开始获取完整列表。