Tag Info

Hot answers tagged

6

I was able to speed up your code by a factor of 47,500 times faster than original. First, note that you can get a fairly good speedup just by eliminating the superfluous nested Table and Sum operators: n = 999; ak = RandomReal[{1, 10}, {1000, n}]; pimatk = RandomReal[{1, 10}, {1000, n}]; fikyj = RandomReal[{1, 10}, {1000, n}]; bk = RandomReal[{1, 10}, ...


4

You can use ParallelCombine for this task: plot = Plot[#, {x, -10, 10}, PlotPoints -> 10] &; funcs = {Sin[x], Cos[x], Sinc[x]}; g = ParallelCombine[plot, funcs, Show] Be aware that the expressions in funcs are not held in this example. Consider using Formal Symbols for the plot variables. You can add styling with post-processing, e.g.: ...


3

Plot by itself is not parallelizable using Parallelize. You can plot each curve in a different kernel using ParallelTable and then Show the results together Show[ ParallelTable[ Plot[ Sin[a x] , {x, 0, Pi} , PlotRange -> {-1, 1} ], {a, {1, 2, 3}}]] You may need to use DistributeDefinitions so the sub-kernels know the definitions of your ...


2

Update Your code appears to be from yesterday's question: My Baum-Welch algorithm is very slow. Is it due to Mathematica? Answer The nested Table[Table[Tables and nested Sum[Sum[s not only make the code hard to read, but may also have a performance hit. Without a clue as to what ak, pimatk, fikyj, bk are, and how big they are, and what n is, this is ...


2

We can try like this: Parallelize[MapThread[ImageSubtract, {{image1,image2}, {fond1,fond2}}]] or ParallelTry[imageSubtract, {{imag1, fond1}, {imag2, fond2}}, 2] While imageSubtract[{image_,fond_}]:=Module[{},( Image[(ImageData[image1]-ImageData[fond1]+1)/2] )] We can use also ParallelMap[] ParallelMap[imageSubtract, {{imag1, fond1}, {imag2, ...


1

Using barrycarter's advice I found that ssh was throwing the error message: ssh: symbol lookup error: ssh: undefined symbol: EVP_aes_128_ctr According to this excellent answer the problem is caused by Mathematica 10 having libraries incompatible with ssh. This problem could be averted by prepending export LD_LIBRARY_PATH= to the launch command in ...



Only top voted, non community-wiki answers of a minimum length are eligible