1k views

Combining values in one column (or part) when values in another column (or part) match

Consider the following: ...
99 views

Accumulate 2D points that have the same first component [duplicate]

I have a list of points: points={{3, 0}, {3, 9}, {4, 2}, {5, 5}, {6, 9}, {6, 6}, {6, 1}, {7, 7}, {8,0}, {8, 10}}; And as you can see on the plot, there are some ...
64 views

Filter through list and lump data [duplicate]

I have a very large data set (around 3000) that looks like: ...
17k views

List of compilable functions

Is there somewhere a list on the functions that Compile can compile, or the cases in which a particular function can be compiled that I haven't found? I'd be glad ...
19k views

How to compile effectively?

What are the best practices of compiling functions? I understand that this is a vague question, but let me list some aspects that might trigger useful answers. Some of these have already been answered ...
1k views

Merging lists and adding common elements [duplicate]

I have two 2D arrays where some of the x-values are identical, L={{1,1},{2,2},{3,3}}; J={{0,1},{2,2},{4,4}}; I want to add these lists in the following way <...
923 views

How to sum over duplicates?

I have a list of the form: {{1, 0, 1}, {2, 1, 2}, {1, 0, 3}, {2, 4, 2}, {2, 1, -1}, {1, 0 ,0}} that I would like to sort such that I calculate the sum over the ...
129 views

List rearrangment with joining of strings

I have a list of strings: lis = {{"a","b","x"},{"d","e","y"},{"a","b","z"},{"d","c","x"},{"a","b","w"}} I would like to use StringJoin on the last elements where ...
352 views

What is an elegant way to add two or more cash flows?

When modeling a swap contract a common operation is to sum up two cash flows producing a resulting cashflow with netted amounts in the highest granularity of the two initial cash flows. What is a ...
142 views

Compute intermediate totals using Select and Plus in a list

I have to total per year of weekly results of a function which are in a table with 3 rows: one with the result of the function, one with the week number and one with the year number. I am almost sure ...