# Tagged Questions

Questions on using and specifying iterators used in Mathematica functions.

21 views

### Do-Command around entire Notebook (by iterating it from another notebook?)

I have a large simulation (1500 lines of code in different sections) and I would like to run the file using different combinations of input parameters without manually changing the parameters. Say my ...
80 views

### How to use NestWhileList with a function of two variables

I want to iterate a function of two variables in NestWhileList. Obviously it will need a termination condition. For example imagine I have this function: ...
67 views

### Can a single Sum with multiple iterators be different from nested Sums?

Multiple sums are documented with two or more iterators, for example: Sum[1/(j^2 (i + 1)^2), {i, 1, Infinity}, {j, 1, i}] however the same answer can be ...
33 views

### Iterating KroneckerProduct[] and returning the result from a function

I am trying to write a function which will take a matrix m and an integer i as inputs. Then it will compute the Kronecker product of m with itself i times and return the result. The code is as follows....
65 views

### How to write a loop to run iterations of functions to obtain different values? [closed]

I am trying to iterate the function a, b and td2 (10 times) inside a For loop. This will gives me 10 different values of td2 which eventually gives me 10 different values of fullData2. In another ...
72 views

### Plotting Invariant Manifolds of the Henon Map

Given the following map: \begin{align} & x_{n+1}=-y_n+2x_n^2 \\ & y_{n+1}=\beta x_n \end{align} for $β \in (0,1)$, $x_n \in \mathbb{R}, y_n \in \mathbb{R}$ (which is a one parameter version ...
146 views

### Calculating the Feigenbaum Constants

I would like to calculate the $δ$ and the $α$ Feigenbaum constants for the Logistic Map: $$x_{n+1}=4μx_n(1-x_n)=f(x_n)$$ as part of an undergraduate assigment of mine. I ...
102 views

### PerfectNumber messes with my iterator

I am using Mathematica 10.4 (sorry bbgodfrey) (temporary message) Let mmVerbose = 10^2000 + 123123798797192983712873198273122323; kkVerbose = 10^7; The ...
124 views

### How to introduce two successive points inside the FixedPointList for each cycle?

If we want to draw the attraction basins of an iteration function of the following type $$x_{k+1}=x_k-\frac{f(x_k)}{\frac{f(x_k)-f(w_k)}{x_k-w_k}},$$ where $w_k=x_k+b f(x_k)$, $b\in R-\{0\}$, we can ...
95 views

### Manipulating the elements of a list

Let's create some sample data tab = Table[{i, j, k}, {i, -3, 3}, {j, -3, 3}, {k, -3, 3}]; ICs = Flatten[tab, 2]; Nt = Length[ICs]; A $3\times3$ system of ...
52 views

### Splitting an Array

Background: I'm a fairly experienced programmer, but new to Mathematica I have an image analysis function I have created, which returns a multidimensional array that I do some processing on. I want ...
53 views

### Define a function interactively with sum

I have to define a function which has 1e4 terms added up together. f(x1, x2) = (sum i, j, k, l from 1 to 10) (C(i) * C(j) * C(k) * C(l) * exp( (alpha(i)+alpha(j)) * x1 + (alpha(k)+alpha(l)) * x2 )...
108 views

### Finding the smallest starting number producing a Collatz sequence of length 125 which ends with a value > 4

I'm supposed to do a Mathematica function that selects the smallest number not less or equal to 4 after 125 iterations. I am not good at coding, so some help/advice would be awesome. My code so far. ...
287 views

### Tweaking a code for basins of attraction

NOTE: Whoever finds a working way for obtaining the basins of attraction in the $(x,\mu)$-plane will add his/her name along with @Quantum_Oli in the list of the acknowledgements of the resulted ...
145 views

### What is the correct way to perform the Gram-Schmidt process?

Im trying to do a simple processing in Mathematica. My original code was in Matlab. Part of the computation is Gram-Schmidt process, which is an iterative calculation. Every vector is changed ...
270 views

### Basins of attraction of equilibrium points

The Henon-Heiles potential is the following V = 1/2*(x^2 + y^2) - y*(1/3*y^2 - x^2); which has four equilibrium points ...
30 views

I'm trying to solve a general solution for this productive iteration, but the program gets stuck in the calculation and says:$RecursionLimit::reclim: Recursion depth of 1024 exceeded. >> Here is the ... 2answers 139 views ### ReplaceRepeated as a Looping construct? There are a lot of discussions about looping constructs (notable example here). Wolfram language guides, as usually, contain most relevant links. Looping constructs guide has the following part on ... 3answers 266 views ### How would I write iterative code to try multiple coefficients for an equation? So, I'm trying to solve a class of equations, and get all the solutions in a list. The general form looks like this: c == a*Sqrt[1-n] PlusMinus[b * Sqrt[n]] ... 5answers 340 views ### How to iterate over the columns of a Dataset? I have a Dataset with a simple structure, like this: ... 1answer 85 views ### Tiny question about Indexed[x,n] Maybe I should apologize for this silly question, but the documentation for Indexed is very short and not explicit. I have an equation with variables ... 0answers 65 views ### Problems with indexes in a Do-cycle and CoefficientArrays I have a system of linear equations with variables$A_n$and need its coefficients in a matrix form (Transform linear system into a matrix form). I'm trying to do that through a ... 1answer 54 views ### Reals in Range; unexpected result for non-standard Precision I think I have encountered advice against using inexact numbers in specifications of ranges and iterator many times. I don't think I ever saw an example of unexpected results though, but today I found ... 3answers 120 views ### How to evaluate an expression over a particular list of tuples? NOTE: This question is very similar to this one but I realized reading at the answers that I made a mistake in the equation AND I was not clear enough about what I need (my apologies): I want to ... 3answers 110 views ### Use Do to evaluate an expression over two indices$i \ne j\$ (over a list of tuples)?

I have an expression of the form: expr1[i_,j_] = Sum[\[Beta][j]*\[Phi][i, j]* C[i] I would like to evaluate this expression over i=1:4, j=1:4 with i!= j. One ...
62 views

### Beginner: Iterative Sequence for Vector Function

I want to create an iterative sequence for two Vectorfunctions, where both are dependent on the same variables and i represents the vector. For simplicity let's ...
107 views

### Generating by plots by rerunning code

I am new to Mathematica. I created a code where I can evaluate a parameter (denoted by PoA) for a random instance of a directed acyclic graph. The code is below. ...
84 views

131 views

### NestWhileList, control to show the second sequence

For example，each number will end up with 89 or 1, however , How can I generate a sequence with two sub sequence. f[n_] := IntegerDigits[n]^2 // Total One sub ...
153 views

### Parallel Apply on a deeply nested expression

I have a deeply nested expression, i.e. something like {{{{...}..}..}..}, and I'd like to use Apply in a parallel fashion, e.g. <...
99 views

### Perform For-loop and show output which meets a certain criterion

I am new to Mathematica and I have a For loop like so: For[i = 0, i < 15, i++, PowerMod[i, -1, 15]] Currently it doesn't output anything. The calculation I am ...
105 views

344 views

### Table with multiple iterators running parallel

I want to use Table to generate a list, but it only allows one iterator to increment at a time. So in ...