# Tag Info

Accepted

### Probability of a union with probability function of vector

Let $(X,Y)$ be a random vector where the probability distribution of the two components are: $$P_X(1) = 0.3, \; P_X(2) = 0.2, \; P_X(3) = 0.5,$$ $$P_Y(1) = 0.1, \; P_Y(2) = 0.3, \; P_Y(3) = 0.6.$$ ...
• 29.1k

### Check if number is in list

list = { {1, 2, 3, 4, 5}, {1, 2, 3, 4, 5, 6, 7}, {1, 2, 3, 4, 5, a}}; 1. Using LookupPart by Richard Hennigan (Wolfram ...
• 82.2k

### Canonical way to map a function to diagonal elements of a square matrix?

A = {{E, 0, 0}, {0, E, 0}, {0, 0, E}}; Using SubsetMap: ...
• 28.3k

### Delete elements less than the last largest element

A variant using FoldList: Union@Rest@FoldList[If[#2[[2]] > #1[[2]], #2, #1] &, {0, 0}, list] {{1, 170.93}, {3, 174.08}, ...
• 28.3k

### Delete elements less than the last largest element

Using IncreasingFilter by Sander Huisman ...
• 82.2k

### Comparing Mathematica expressions like diff

In version 14.1, there is a new function called Diff. It's not the solution to your problem, but it might still be useful to some. It doesn't compare expressions in ...
• 29.1k
1 vote
Accepted

### Find the feasible solutions of a minimal path set of vectors

Not sure if this is what you need. ...
• 1,039
1 vote

### Probability of a union with probability function of vector

You can use Multinomial Distribution and TransformedDistribution and Probability,e.g. ...
• 62.9k
1 vote

### How to compile the code for generate Pythagorean_triple?

A variation of Mr.Wizard, a little faster: ...
• 15.7k
1 vote

### Check if number is in list

list1 = {{1, 2, 3, 4, 5}, {1, 2, 3, 4, 5, 6, 7}, {1, 2, 3, 4, 5, a}}; list2 = {{1, 2, 3, 4, 5}, {1, 2, 3, 4, 5, a}, {1, 2, 3, 4, 5, -1}}; Using ...
• 28.3k
1 vote

### How can I print only the lines for a file that contain consecutive digits?

string = "123 321 567 765 124 568"; Using StringSplit and Select: ...
• 28.3k
1 vote

...
• 82.2k
1 vote

### Flattening the output of Solve[]

expr = Solve[y[x] == x^2 + c, c]; Using Query Query[Flatten, {Keys, Values}] @ expr {c, -...
• 82.2k

Only top scored, non community-wiki answers of a minimum length are eligible