基于所有先前方程结果的Mathematica绘图

时间:2015-06-29 13:29:12

标签: graph plot wolfram-mathematica equation

我有一个情节
Plot[40500*x^(-0.1), {x, 1, 100}, PlotRange -> {0, 50000}]

我正在尝试绘制这些y值的累积值。我将尝试用一个例子来解释:

我想要

for x=1: 40500*1^(-0.1) 
for x=2: 40500*(2^(-0.1)+1^(-0.1)) 
for x=3: 40500*(3^(-0.1)+2^(-0.1)+1^(-0.1)) 
and so on up to x=100.

有办法吗?

1 个答案:

答案 0 :(得分:0)

as((split(first2$Product,f = first2$Transaction_Id)),"transactions")

运行一些示例
x = 3
for x=3: 40500*(3^(-0.1)+2^(-0.1)+1^(-0.1)) 

可以使用114574.

找到
Sum

或使用Sum[40500*i^(-0.1), {i, 3}]

Fold
Fold[#1 + 40500*#2^(-0.1) &, 0, {1, 2, 3}]

114574. 输出中间步骤。

FoldList
FoldList[#1 + 40500*#2^(-0.1) &, 0, {1, 2, 3}]

累计到100并丢弃初始零值:

{0, 40500., 78287.8, 114574.}

enter image description here