Linked Questions

2 votes
0 answers

Why doesn't Position work? [duplicate]

I have defined a list ...
skrat's user avatar
  • 1,275
602 votes
19 answers

Where can I find examples of good Mathematica programming practice?

I consider myself a pretty good Mathematica programmer, but I'm always looking out for ways to either improve my way of doing things in Mathematica, or to see if there's something nifty that I haven't ...
84 votes
4 answers

Using a PatternTest versus a Condition for pattern matching

My last question to the site resulted in several answers that involve using pattern matching in Mathematica, a feature I wasn't very familiar with at the time. I am currently reading Mathematica ...
Alfred Fazio's user avatar
  • 1,175
23 votes
5 answers

The difference between 0. and 0

I have a function for which 0 is a special case: f[A___, 0, B___] := 0 But since I am doing numerics, sometimes in the course ...
Ian Hincks's user avatar
  • 1,859
4 votes
6 answers

Removing zero values from ordered pairs

I have some processed data, which are basically a collection of ordered pairs in the form: {{x1, y1}, {x2, y2}, ..., {xn, yn}} Ordered pairs which have either a ...
Y. Jones's user avatar
6 votes
3 answers

Using function with multiple definitions in Manipulate

I'm trying to use Manipulate to visually try out different values of lambda in a Box-Cox transformation. I've created a boxcox ...
Mr Alpha's user avatar
  • 3,156
9 votes
3 answers

Strange behavior of MemberQ, Position

After importing an array of latitudes and longitudes and trying to find the position of some latitudes I was encountered with an unexpected problem since certain values could not be found for some ...
zoutoftime's user avatar
3 votes
1 answer

How to find non zero elements of a list containing zeros and symbols

I have a list, obtained after differentiating a list of expressions, which contains zeros and symbols, say: A = {x1^2, x2^2, x3^2, x4^2} D[A,x3] results in the ...
vesofilev's user avatar
2 votes
2 answers

Plotting data in a weird format

I have a lot of data on the following form: data = {{param1,param2,param3,param4,{{x1,y1},{x2,y2},...,{xn,yn}}},...} The first variables in each sublist are ...
Haffi112's user avatar
  • 275
2 votes
1 answer

Numerical comparisons of matrices

I have a matrix which should be equal to a null matrix. However due to the numerical precision, a brutal equality test with a matrix initialized with zeros does not work. How should I perform the ...
Cedric H.'s user avatar
  • 696
5 votes
1 answer

NDSolve refuses to initialise when solving an integro-differential equation with custom pdetoode solver scheme

Problem Background Recently I'm attempting to replicate the result of the following research paper on the Nonlocal description of Evaporating Drops. The equation of motion of a evaporating, spreading ...
FLP's user avatar
  • 475
3 votes
2 answers

How does mathematica decide what `x_` is in `MemberQ[list,x_/;(x==#)]&/@list`

Consider the following code: list={1,2} MemberQ[list, x_ /; (x == #)] & /@ list This gives {True,True} ...
majmun's user avatar
  • 207
2 votes
1 answer

How to use Select to exclude a single element which I can control? [duplicate]

I have code which inserts an expression into lists that I need to remove. I can insert anything I want, a string, variable, or number, into the lists. Suppose I insert the number 13 as my blacklisted ...
Steve's user avatar
  • 1,153
1 vote
1 answer

In a list having triplet elements, how can I change the third element of a triplet when it has a given value? [duplicate]

BatbuyanMGL's user avatar
2 votes
1 answer

Strange behavior when defining a symbol/function pointwise

I am well aware of the fact that floating point number have finite precision, so one needs to be careful when comparing them. Still, I find it disturbing/surprising that the following input into ...
cgogolin's user avatar
  • 415

15 30 50 per page