Wednesday, 28 August 2013

Why is building a table of function values so much slower than just plotting the function=?iso-8859-1?Q?=3F_=96_mathematica.stackexchange.com?=

Why is building a table of function values so much slower than just
plotting the function? – mathematica.stackexchange.com

Here is a function that take some time to evaluate: n = 1000; coeffs =
RandomVariate[NormalDistribution[], n]; f[x_] := Sum[coeffs[[k]] Sin[k
x]/k, {k, 1, n}]; If I just plot the function with 1000 …

No comments:

Post a Comment