# All Questions

Tagged with
18 questions
Filter by
Sorted by
Tagged with
27 views

### How to calculate Sum of a function over a list

tlist = Table[i, {i, 1, 10}] tlist:{1, 2, 3, 4, 5, 6, 7, 8, 9, 10} f = E^(-((2 t)/T)); ...
28 views

### How can I parallaize expresion that contains ParallelSum?

I have this code where the last part contains ParallelSum ...
109 views

### How can we speed up a matrix multiplication using ParallelTable and ParallelISum?

I do belive that Mathematica can work as fast as other packages, but it is really sensitive to the way we write the code. Here I would like to evaluate a trace resulted from a matrix multiplication at ...
42 views

### How can I use ParallelTable with ParallelSum effectively?

I have this expression (as an example) as a function of nc and nr (real one is more nasty) ...
76 views

### Local variables in sums and tables - best practices?

Stumbled on Local variables when defining function in Mathematica in math.SE and decided to ask it here. Apologies if it is a duplicate - the only really relevant question with a detailed answer I ...
66 views

### Unexpected result given by Sum [closed]

Consider the following (minimal?) working example: ...
55 views

### Sum up different arrays into a new array

I have a question regarding sums in arrays. So I have the following array: ...
871 views

### How to speed up large double sums in a table?

I am calculating a 3-by-3 matrix whose elements are given as follows: $$M_{mn} = \frac{1}{N}\sum_{i=1}^N \sum_{j=1}^N (r^i_m - r^j_m)(r^i_n - r^j_n) \tag{1}$$ where $N$ is the total number of ...
235 views

### Create and manipulate list with variable length?

Is there a way to create and manipulate a function of a sum of arbitrary length? Specifically, I'd like to create a function like the following: ...
242 views

### Cumulative total of columns in a matrix or table

I have the following: matrix1 = {{a, b, c, d}, {e, f, g, h}, {i, j, k, l}, {m, n, o, p}} (Note that it's the data that matters, not the fact it's defined as a ...
64 views

### Summing results of a table

I have a simple table: example1 = Table[N[x^(x/r), 5], {r, 1, 10}, {x, 1, 10}] I want to create a new table ...
212 views

### How to correctly implement in a new function the scoping behavior of Table, Sum and other commands that use Block to localize iterators?

It is documented that "Block is automatically used to localize values of iterators in iteration constructs such as Do, Sum, and Table." Therefore the dummy index (iterator) in a Sum is shielded ...
109 views

### Accessing the elements in a table is slower than calculating each time?

This is a follow-up of How to accelerate combinations and sum calculations here? I have tried all tricks but when N reaches 35 the time is still intimidating in a 16-core server, which is far better ...
39 views

### Partial Sum of Binary Sequence not Working

I have the following code: ...
516 views

### How to increase the evaluation speed of this somewhat complicated table / matrix operation?

I'd like to calculate the following one-dimensional array: OneDimArray = Table[(Norm[Sum[ MatrixA[[i,j]]VectorB[[j]],{j,N}]])^2,{i,N}] However this takes a very ...
129 views

### tabulating summation series with restrictions

Trying to solve this question for a good 5 hours but remained stuck. My intuition tells me I am missing something trivial that I've overlooked or forgotten. I am restricted only to the function 'table'...