Linked Questions
15 questions linked to/from Position function not always returning an answer even with no apparent problems
2
votes
0answers
61 views
558
votes
19answers
141k 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 ...
77
votes
4answers
5k 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 ...
20
votes
5answers
7k 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 ...
4
votes
6answers
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 ...
6
votes
3answers
839 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 ...
3
votes
1answer
6k 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 ...
8
votes
3answers
323 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 ...
2
votes
1answer
409 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 ...
2
votes
2answers
311 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 ...
3
votes
2answers
133 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}
...
1
vote
1answer
129 views
2
votes
1answer
104 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 ...
2
votes
1answer
75 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 ...
2
votes
0answers
86 views
Hashing by Equals instead of SameQ
I have some numerical code involving complex numbers representing points on a plane. Some of these are equal but not identical, ie
...