# Tagged Questions

The tag has no usage guidance.

87 views

### An alternative to subscripts?

Are there any good alternatives to using subscripts to keep track of and uniquely identify many variables? I know that subscripted variables behave badly. Thanks!
89 views

### Define a 4d matrix without for loop

I was wondering if there is a way to avoid for loop here: I want to define a 4d matrix H(i,j,k,l), and each entry in the matrix is calculated through a complex function, say Do_H(i,j,k,l), depending ...
96 views

1k views

### Minimizing using indices, error: Part::pkspec1: The expression cannot be used as a part specification

I want to use Minimize where the variables to minimize are indices pointing into an array. Here a MWE that hopefully shows what my problem is. ...
129 views

### Summation notation

I have the current setup for calculating Allan Deviation: which was coded as: Sqrt[Total[Differences[y]^2]/(2 (M - 1))] However, after doing some research, ...
144 views

### How to evaluate sum with different coefficient in each term?

I would like to know if there is a syntax that allows me to enter a sum that has coefficients that vary for every term? I have no interest in evaluating them numerically, but rather to keep them as ...
91 views

### Beginner Question: Assigning an indexed Variable to a given list

I am pretty new to the game and have a problem, which i am sitting on for hours. 1) I created a random Matrix 5x5 Q=Table[Q[i,j]=RandomReal[{0.6,1}],{i,5},{j, 5}] ...
112 views

### Using indexed array elements as integration dummy variables with EvaluationMonitor. Bug?

As part of a routine that must cope with integration of varying numbers of dimensions, I would like to use indexed variable names (e.g., x[0], x[1],...) as dummy integration variables. However, it ...
81 views

### Referring to the components of a vector within a sum

I feel like I'm missing something obvious here, but.... I'm playing around, trying to do the standard deviation for my stats homework (don't worry, I already worked out the answer by hand), and I ...
126 views

### Recreating in Mathematica a matrix created in Python [closed]

I need to recreate in Mathematica this matrix that I created in Python: ...
51 views

### Index change in a recursive definition

Assume I have the following recursive definition: ...
760 views

### Faster position list construction from a “take instructions” list

Take some list, e.g., {1,2,3,4,5}, and a "take instructions" list, say {1,1,2,1,1}. The latter is read as "take the first ...
74 views

### Recurrence evaluation at specific index

I have the following set of equations. I want to solve a[n] and f[n] for the indices n=1:5. Note that the relation a[2n+2] involves the derivative of f[2n] and the relation for f[2n+2] involves the ...
68 views

### Loops over multiple variables (negative i_min)

Can someone explain why i ranges from -3 to 3 in the output of Do[Print[{i, j}], {i, -3, 3}], but not in Do[Print[{i, j}], {i, -3, 3},{j,-i,i}]? I was thinking for the second input I would get {-3,-...
169 views

### Array element problem in optimization

I have the following piece of code in Mathematica: ...
449 views

### How do I find the position of the maximum value in each column of a table?

Given a table of values, I know how to find find maximum values, but how do I find the position of the maximum value in each column. For example, given ...
259 views

### Define a Recurrence Table involving other tables

I'm relatively new to using Mathematica. Previously I used Matlab, but lately I noticed that the numbers i got in both of them do not match (mostly it seems that Matlab lacks precision...). The ...
142 views

### Unexpected behavior from Indexed (threading and messages)

I was going to include Indexed in this answer, thinking that it operated much as a List-only ...
224 views

### Collect terms in a sum

Suppose I have this expression ...
389 views

### Numbering nested list according with Depth (or Level)

(This question is slightly similar with Sequentially numbering a nested list, but not exactly the same.) What I want Say I have a nested list ...