Questions tagged [iteration]

The tag has no usage guidance.

29 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5 votes
0 answers
126 views

NestList in 12.1/12.2 is 10x slower than 11.3/12.0

Are there any configurations to fix it? Test code: ...
• 9,318
2 votes
0 answers
55 views

Recursively create Graph from seed and Nest GraphUnion, keeping VertexStyle, EdgeLabels, VertexCoordinates, EdgeShapeFunction

TL;DR; GraphUnion does not preserve properties of the input Graphs. How do I combine two ...
• 36.3k
1 vote
1 answer
103 views

A way to generalize my code for this non linear ODE problem

I am trying to solve the differential equation $y''(x) = y(x)+\sin[y'(x)]$ using "Fixed Point Iteration" over the interval $[0,1].$ Now using central difference method I arrived at the ...
• 219
1 vote
0 answers
104 views

FoldList with Composition and parameter

Good day to everyone! I have two (just for simple example) functions and they compose a map: ...
• 99
1 vote
0 answers
59 views

Find parameter ranges of a function whose value is within a window by sampling points

Problem: I want to find the ranges of the parameters for a function $f(x,y,z)$ when $0.9 < f(x,y,z) < 1.1$. All parameters are bounded $x , y, z \in [0,1]$. In the real problem the function ...
• 111
1 vote
0 answers
87 views

Recursion depth of 1024 exceeded during evaluation of ... when importing a directory with many files

I'm doing this: Import["/Volumes/Transcend2/images/", "*.jpg"]; And getting these errors: Then, after it's done, when I type "images" and shift+enter, I just ...
0 votes
0 answers
32 views

How to find clear solution for iterative problem by condition $<v_k ,v_n>=0$ If $k!=n$

I want to find x[n] by v[n] values without x[n] in solution by iterative below problem: <...
0 votes
0 answers
45 views

FindMinimum with many Sums and NIntegrates is very slow

I want to calculate the global minimum of an equation which has several hundred Sums (I used 300 in this code), but the calculation is very slow. My code is as ...
• 101
0 votes
0 answers
65 views

Successive multiplications using Mathematica tools

Successive rotations on the unit circle Given an arbitrary starting point $z$ on the unit circle in the complex plane, the goal is to compute a cycle of rotations by $\pi$/2 with successive ...
• 1,060
0 votes
0 answers
51 views

Iterating an operator on a polynomial

I want to be able to build an operator $S$, on a polynomial in multiple variables which does something like this $f[x,y] =$ some polynomial $S[f][x,y] = y*f[y,x]$ And then for a specific choice of $n$,...
• 101
0 votes
0 answers
23 views

Difference between SubstitutionSystem and StringReplace

I'm examining two-step substitution model: First step, division: {"A" -> "BC", "B" -> "AC", "C" -> "AB"} Second step, merging: {&...
• 1,491
0 votes
0 answers
69 views

• 101
0 votes
0 answers
127 views

FindRoot not recognising replaced symbol in nested function

I have the following example FindRoot function as part of a Nest function. ...
0 votes
0 answers
57 views

Iterating over a list and defining the range accordingly

I have the following list, l = {{"a", "b"}, {"a", "b"}, {"c", "d"}, {"e", "f"}, {"e", "f"}, {"x", "y", "z"}, {"m", "n", "o"}, {"p", "q", "s"}}; for each ...
• 2,946
0 votes
0 answers
101 views

How to save a all matrices renewed in each iteration?

I have a (n by m) matrix , in which the elements are recalculated and replaced by new ones in each iteration. (In other words I have a loop in which the elements of the mentioned matrix are being ...
0 votes
0 answers
147 views

How can I make my code containing a For loop more Mathematica-style?

I know there are a lot of questions on this site regarding the use of For loops and how to avoid them in Mathematica. However, in my case I believe it is justified,...
• 999
0 votes
0 answers
149 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: ...
• 41
0 votes
0 answers
167 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: ...
• 101