# Questions tagged [index]

Questions about functions with intrinsic part index such as SparseArray, Part and Indexed or iteration variable indexes such as MapIndexed, Sum and Product.

100 questions
Filter by
Sorted by
Tagged with
1 vote
71 views

### Can't use iterative variable as part specification [closed]

I've got the following mathematica code: ...
64 views

### Problem with integration with indexed variable

I wonder why I can not have a correct integration form on Mathematica with some indexed variables. Indeed, when I write : ...
152 views

### How to use Position to select based on absence of a pattern?

I need to use Position to obtain positions of entries in list of lists that do not contain a certain pattern. The problem is that ...
142 views

### Substituting the element of a list into a list that contains the index position

I see similar questions for lists and indexes and manipulating with Thread, MapIndexed,etc., but I do not see how to do a substitution. I have a list of coordinates for a geometric object and a list ...
1 vote
138 views

119 views

### How would you explain Nothing[] weirdness? [duplicate]

I would like to use Nothing[] to make some elements of a list invisible. (The intended use is to remove a few unwanted points from a ...
1 vote
113 views

### How does Indexed work in terms of sparse array

I want to use indexed given that s is an element [0,500] but I am unsure how to write that without getting a format error or a tensor error. ...
124 views

### Integer functions indices in a sum

I have some troubles with plotted A versus p, especially for the function F(s,l,p), I don´t know how deal with the integer functions indices of the sum. How can I input such a sum to Mathematica?. ...
1k views

### Map vs. Table for index-specific operations on 2D arrays

Many experienced users on this site tend to use Map (and its variants, MapAt, MapIndexed, etc.) rather than Table. When applying the same operation to every element of an array, Map does seem more ...
249 views

### Function over a list that depends on the index

Suppose I have a list {a, b, c, d} I want to operate on this list with a function which depends on the index of the element, e.g. I want to add the index ...
889 views

### Is there an easy way to index by a binary vector / mask?

I would like to be able to extract elements from a list where indices are specified by a binary mask. To provide an example, I would like to have a function ...
1 vote
244 views

### Collecting terms from expression with indexed functions

Say I have an expansion of terms containing functions y[j,t] and its derivatives, indexed by j with the index beginning at 0 ...
113 views

### Typography of Mixed Tensor Index Notation

How can one properly and quickly write a mixed "tensor" such as $\Gamma{}_{1}{}^{2}{}_{3}$? Shortcuts such as esc Gamma esc, Ctrl+^, Ctrl+_ are prefered. I intendd to use this in an inline equation ...
1 vote
236 views

### Create list of values with arbitrary index and the use it in a function

I have the following generating functions: $l_{2i-1}=l_{1}-(i-2)(w+s)$ with $i\geq 2$ and $l_{2i}=l_{2}-(i-1)(w+s)$ with $i\geq 2$, so the first one is for odd index and the second for even index. ...
1 vote
660 views

### Sum over multiindex

I would like to calculate a sum over some multi-indices, that follow a specific pattern. $$\sum\limits_{1\le i_1<i_2<...<i_k\le N} A(k,i_1, i_2, ..., i_k).$$ $A$ is a fix expression of the ...
20 views

### Why do I have to index my covariance matrix as if it has 3 dimensions [duplicate]

The language reference for getting parts of a matrix seems to make sense. I'm wondering why my covariance matrix behaves differently. ...
113 views

### ParallelDo with doubly-indexed iterators

What is the reason that ParallelDo works with singly-indexed iterators, but not doubly- or more-indexed iterators? For example, the code ...
48 views

### Defining list of data

I need to define a list of parameters A[i] where i runs from 1 to some integerN. The ...
123 views

### Algorithm for Swapping indices and simplifying the summand in a double sum [closed]

Say we have something like $$\sum_{p}^N\sum_{q}^N \cos(p) \sin(q) - \cos(q)\sin(p)$$ usually, in the case like this, the indices p and q can be swapped, and the sum simplifies to 0. I have an ...
659 views

### Indexing nested list with another list

So I'm wanting to index the sublists within a list using another list. So I have x = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}} And I want the 2nd term of the first ...
1 vote
1k views

### Finding the x-value corresponding to a y-value found using Nearest [closed]

I have a large 2d array of infinite precision named "data" of x values and y values. I am using Nearest to find the y-value closest to a specified number, say 0....
1 vote
177 views

### subscript index notation select certain value [closed]

I have an indexed variable Subscript[p, s, m, t] established using the Notation method. There are various expressions where s, <...