对数间距数 [英] Logarithmically spacing number
本文介绍了对数间距数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想测试几个强度值.
I would like to test several values of intensity.
我需要将它们对数地从1到1000隔开.但是我只使用1、10、100、1000,但是我想有更多的数据点,比如说10.
I need them to be spaced logarithmically from 1 to 1000. Yet I just use 1, 10, 100, 1000, but I would like to have more data point, let`s say 10.
如何在Mathematica中找到10个对数间隔为1到1000的数字?
推荐答案
如果a
开始,则c
是结束,而b
是间隔数:
If a
is start, c
is end and b
is 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.}
我使用N
只是为了更好看,我们有什么.
I used N
just to see better, what do we have.
这篇关于对数间距数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文