Linked Questions

2 votes
0 answers
74 views

Why doesn't Position work? [duplicate]

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

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
6k views

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
9k views

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
3k views

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
1k views

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
402 views

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
9k views

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
822 views

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
492 views

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
329 views

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
317 views

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
212 views

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
139 views

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
81 views

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