448 views

### How to do memoization together with evaluation of a complicated function

UPDATE 2: much shorter version Given a list of paired indices {i, j}={{1,2}, {3,4}, …}, I need to first evaluate a rather complicated function test[i,j,x] (because ...
574 views

### Generate a list of all user defined functions including their argument patterns

I have defined a bunch of functions over several different files, and I would like a list of prototypes of all the functions I have defined in my current session (I want the mathematica equivalent of ...
146 views

### Trace of -{1} expression

I'm trying to understand Trace. Usually it doesn't repeat but it adds {-1,-1} for his simple expression after having a correct ...
512 views

### Recursive list contruction

I am attempting to implement the exercises from The Little Schemer in Mathematica, and running to a bit of a challenge with rember (remove member). Given a list and a value, the function just returns ...
396 views

### How to construct this matrix fast?

I write a function which is a matrix as below: ...
131 views

### Repeatedly apply a bivariate function with one argument running over a list

I'd like to know how, given symbols f and g, and a list {a,b,c,...}, to produce the ...
952 views

### Create a table with inline conditions

I am trying to create a table with conditionals inline. For example, I'd like to create a 2 dimensional table like this: ...
195 views

### how to make program read from top-to-bottom? [closed]

"As a general principle, make the program read from top to bottom rather than jumping around. Experts agree that top-to-bottom order contributes most to readability." I think it's difficult to do it ...
306 views

### Speed up manipulate by exporting each step as an image

Consider a manipulate function such as: ...
732 views

### calculating a sequence of functions using iteration

I am trying to compute a sequence of functions using iteration and keep running into problems trying to use built in looping commands because of the recursive nature of the definition. The code below (...
162 views

### Is it possible to use the global definition of a symbol as part of its new local definition set in a Block?

Consider the following expression: Block[{Print = CopyToClipboard}, doSomething[]] Now all calls to Print from ...
1k views

### Finding max, min, and closest root of two dimensional data

I have some data that is two dimensional (traditional (x, y) format) as so: var = {{x1, y1}, {x2, y2}, {x3, y3}} I would like to search through that large list ...
945 views

### Specifying an array that may have an unknown number of entries [duplicate]

Say I'm running some process of unknown duration, and during the process, I need to periodically record the state of some variable. If we knew exactly how long the process took, we could simply ...