61 views

### Why doesn't Position work? [duplicate]

I have defined a list ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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} ...
129 views

...
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 ...