# Questions tagged [nest]

The tag has no usage guidance.

27 questions
Filter by
Sorted by
Tagged with
41 views

I'm attempting to calculate the gradient of a function defined by two variables. After following a tutorial I found, I have the following code: ...
79 views

### Recursive nesting with parameter

I would like to apply a function f recursively to an expression expr an arbitrary number of times. However the catch is that <...
70 views

### How to nest multiple functions with multiple variables

I'm trying to solve coupled equations by using iteration. There are two functions $G$ and $H$ that I need to find. In the code, G and H are actually lists of numbers. I start by using a simpler ...
123 views

### Building Truncatable Primes using Nest(List), While, Fold

Here is a video on Truncatable Primes. I tried to build it myself. Here is what I have tried using the method in the video for left Truncatable Primes. ...
74 views

### How to iteratively (or most efficiently) create such list?

Update A very crude attemp ...
75 views

### Using NestList?

Here is the code that I have so far: ...
86 views

### NestList: How to have a parameter that is changing as a function of nest index, n?

I have a NestList construction NestList[STEP[#] &, m0, NT] where a function is being called repeatedly that acts on a list and returns a list, for details, ...
124 views

### Sum with variable terms to sum over

Suppose I have a polynomial like this: $$a=x_{j_1} + x_{j_1}x_{j_2} + x_{j_1}x_{j_2}x_{j_3} + ...+x_{j_1}x_{j_2}x_{j_3}...x_{j_n}$$ I want to create a function that takes this polynomial and does the ...
57 views

### Variable nesting depth inside table

I hope my title makes sense. The idea is the make a function in which a set of variables, $l_1$, $l_2$, etc. are accessible inside the innermost body of a nested (/folded) function. Each of these ...
40 views

### Generating GIF animations of nested Manipulate expressions

I have a quick and dirty function that I use a lot for generating interfaces for internal demonstrations: ...
86 views

### Can I use Nest iteration variable as the variable of Limit?

Can anybody tell me what is wrong with this: Limit[Nest[1/(1 + #) &, x0, n], n -> ∞]
119 views

### nested commutators

I have defined the commutator between two matrices as comm[A_,B_]:=A.B-B.A I have defined the nested commutator as ...
300 views

### Efficient implementation of Non-Maximum Suppression

I would like to know is there is a way to do this: ...
45 views

### NestWhile and infinite loop

Obviously, the following code leads to an infinite loop: ...
83 views

### Reproducing Nest-function with recursive nesting does not work

In general, when I am learning a new programming language, it helps me to understand how builtin functions works. I am trying to reproduce the builtin Nest[f,exp,n] ...
102 views

### How to give a function multiple variables in a mapped and nested list?

I come from python (not advanced tho), and have been learning mathematica. I'm currently struggling with the following code: This is a basic version of what i wanted to implement: ...
211 views

...
294 views

### Using Nest to build continued fraction

To build basic continued fraction one can simply use: Nest[1/(1 + #) &, x, 3] However, it's unclear how using Nest ...
53 views

### Removing from a sublist, inserting into another one

From a list like test = {{1, 3}, {2,7, 8}, {5,6}}; I would like to randomly select k elements, lift them out of their current ...
572 views

### Delete repeating elements across sublists

I have a list like this test = {{1, 3, 5}, {7, 2, 8, 5}, {7, 1, 3}}; The list is guaranteed to have duplicates only across sublists and not within. I would like ...
171 views

### Reducing the computation time used by parallel table when finding a fixed point

I am using Intel Core(™) processor, 32 bit operating system, 4GB RAM, Windows 7. I am running the following code and it is taking hours to obtain the result. Can any one help me in improving the codes ...
81 views

### Join nested lists if first element is within another list

I have a list like: list1={{1, 16}, {1, 14}, {1, 3}, {1, 18}, {1, 2}, {1, 17}, {2, 17}, {2, 18}, {3, 14},{4,10}} I would like to see if the first element of one ...
80 views

### Dummy variable in nested integral operator

I am trying to make a nested integral operator where the output function of one step must be applied to the dummy variable to be integrated in the next step. Here my code: ...
117 views

### nest non pure function

I have a problem to nest a non pure function.The function f has two arguments, i and j, it ...
940 views

### Simple Birth Death Process

I am trying to implement simple birth death process. Why my code does not work? Any suggestion. Thanks. Cross posted http://community.wolfram.com/groups/-/m/t/1205656 ...