# All Questions

174 views

### DeleteMissing level spec confusion

Given: titanic = ExampleData[{"Dataset", "Titanic"}] Why does this correctly delete Missing[] elements: ...
906 views

### Converting a string containing whitespace-delimited numbers to a list of numbers

Suppose I have a string str that contains only whitespace-delimited real numbers: ...
263 views

### Graph does not evaluate some options when not displayed

How can I force Graph to evaluate all its options without actually displaying the graph itself? Evaluating the following code ignores the ...
334 views

### Diagonals of a regular octagon

We had a little activity after school today and one of the questions was: All diagonals are drawn in a regular octagon. At how many distinct points in the interior of the octagon (not on the ...
114 views

### Synchronizing Dynamics with EventActions ( and other preemptive evaluations)

I would like to make a simple "game": Display a dialog with a random letter, if the same letter is pressed on the keyboard, the display changes into a string ...
338 views

### Cannot Get Numerical Results to Match

I try this numerical summation (in two parts) ...
94 views

### Problem Using Evaluated Replace with Associations

If I define some function like: toISOdate[data_List]:=DateString[data,{"Year","-","Month","-","Day"}] and try to applicate it in an ...
1k views

### Select a repeated element in a list

I want to select all elements that repeat 4 times in the list. I propose this code ...
562 views

### Parallel optimization of Markov Chain Monte Carlo

I'm trying to reduce the computation time of a MCMC simulation. Essentially I have a set of particles performing a random walk in a periodic random potential. The particles are independent and every ...
3k views

### Is it possible to generate a Hasse Diagram for a defined relation?

I'm looking for a way to create a Hasse Diagram from a given partial order binary relation. The relation will be given explicitly, for example: ...
571 views

### How to overload SystemStringJoin to automatically use ToString on arguments?

I am using an overloaded version of the StringJoin function since years now, without any problem, as I've invested a lot of time and effort earlier to make its ...
451 views

### Representative Smooth Kernel Distribution from Truncated Distribution

I am trying to produce a better distribution from a dataset that is bounded to be greater than 0. Here is an example distribution from the documentation that mimics the behavior of the actual dataset: ...
232 views

### Keeping vertexcoordinates after adding a new vertex

I want to add a new vertex to a graph, with fixed VertexCoordinates but when I use VertexAdd, the new graph does not have the VertexCoordinates of the previous one. ...
741 views

### Fitting data to an ARProcess using FindProcessParameters

I have 50 data points that I would like to represent as an AR(4) process. I'd like to over-plot the behaivor of the estimated process model with that of the original (raw) data before I use the model ...
444 views

### How do I plot my country map with weather data stations?

I've tried this code, but I can't plot the coordinates in my country map. ...
540 views

### Finding connected components in an array

I have an $w\times h$ array with non-negative integers. I wish to partition the set of coordinates $(c,r)$ with $1\leq c \leq w$ and $1\leq r \leq h$, in subsets, so that each subset corresponds to a ...
541 views

### How do I find the amount of free space on disk?

I know a workaround, where one calculates sizes of all files and then you subtract this from your default space, but is there any direct way to do it? Simplicity and speed are important. There's the ...
2k views

I want to create a two-dimensional plot using data from an external file. This file contains several triplets of numbers. The first two columns indicate the x and y position, while the third one works ...
4k views

### Mathematica function intersection points with 3D grid

I need to produce a 3-dimensional equispaced grid over a given function in a way, that I can calculate intersection points of the function with the grids edges. So my first question is how to produce ...
2k views

### Export Table from Mathematica into specific cells Excel

How can I export a table to Excel - to specific cells, e.g. D1-E2? Background: I want to compare results, and it's easier to have the results on one spreadsheet. I'm using Mathematica 6. This is my ...
1k views

### Formatting output of OpenAppend[] to match what Export[data,file,“.csv”] would output?

I have a large data set that gets exported to a .csv file. Export[data,filename,"csv"] is extremely fast and formats the data in a nice JMP-friendly manner. However,...
188 views

### Performance: Collapsing repeated contiguous rows & cols from a matrix

In this answer I needed to remove contiguous zero-valued cols and rows from a matrix, leaving only two of them in place, no matter what the original number was. I made up this code: ...
154 views

### Multidimensional arbitrary precision spline interpolation on the grid

This question is a generalization of the previous one for multiple dimensions. In the answer to that question an implementation for the clamped spline interpolation for 1D case and arbitrary degree of ...
126 views

### Solving an equation with rational expressions (step by step) [duplicate]

Consider the following equation with rational expressions: $$\frac{5}{x+4}=4+\frac{3}{x-2}$$ We will look at the plot. We will use the Solve command to check our answer. ...
240 views

### How should I deal with messages being produced by my Manipulate?

I have made a knockoff of John Polking's dfield for a web-embedded CDF (via Enterprise Mathematica). My code extends that from Belisarius who last year showed me how to use ...
190 views

### Ordered associations

Mathematica 10 has introduced Associations, elsewhere known as hash tables or dictionaries. Is there Ordered equivalent like in Python, Java, .NET? The data structure should remember the order in ...
321 views

### HoldForm does not Hold Form for fractions sometimes

I'm facing a strange behavior of HoldForm. I need to display 1/2*3/4 in LaTeX like this : $$\frac{1}{2} \times \frac{3}{4}$$ ...
383 views

### Histogram of a very large dataset?

I have a very large dataset stored in a file (over 2GB). The file contains a tab-separated table of floating-point numbers. I want to do an Histogram of all the numbers in the table. But if I try to ...
373 views

### How to fold output cells by default?

In Mathematica the default behavior of output cells is to pop up after the kernel has processed the input cells and got a result. I know I could add ; in the end of ...
678 views

### Is Table the only functional way to construct nested loops in Mathematica?

Suppose you have a cubic box containing identical particles and you want to compute the distances between each particle and every other particle in the box without double-counting (i.e., if you've ...
179 views

### Capturing an F1

I teach an Intro to Mathematica course, and one of the things I try to reinforce early on is just how helpful Mathematica's help is. In the very first lab for the course, I even give the students a ...
142 views

### Inaccurate Heliocentric coordinates of PlanetaryMoonData

I have noticed that the heliocentric coordinates obtained with PlanetaryMoonData are very inaccurate. Fore example, consider the Galilean moons of Jupiter: ...
369 views

### Getting all physical units with prefixes

How we can get the list with all physical units and prefixes from WolframAlpha and make symbols from the result to be equal their corresponding quantities like described in this post?
230 views

### How to get the coordinates of the intersection of two lines from a ListLinePlot?

Suppose I have two curves intersect at some point, how can I read the coordinates from the graph, not read by eye, but find it with more precision by computer. For example, here are two lists created ...
559 views

### Why is there a huge performance gap using Map with more than 100 List entries

im using Map on a List like this: cube= {{1, 1, 1}, {1, 1, 2}, {1, 1, 3}, {1, 1, 4}, ... , {5, 5, 4}, {5, 5, 5}} Mapping the whole List with 125 entries takes ...
347 views

### Embedding StreamPlot in Graphics3D

I am trying to visualise the action of the infinitesimal generator of a Lie group on the solution of a 2-ODE system drawn in the 3D space (t,y1,y2): t is time and y1,y2 are the two dependent variables....
668 views

I've upgraded to Mathematica 9.0 on Ubuntu 12.04 with the latest Nvidia driver (304.64). I load CUDA by using, as usual, Needs["CUDALink"]. ...
100 views

I am using Mathematica 9 on Windows 8, and I regularly want to use cell styles such as Section, SubSection and so on. If I click the + button before creating a new ...
2k views

### Replace function and its derivatives found with Solve

If I have an equation eq = f[x] + g[x] == 0 and I solve for f[x] sol = Solve[eq,f[x]] ...
9k views

### How to tell Mathematica that certain variables are real/imaginary, integer-valued, etc

I'm trying to expedite some quantum mechanical calculations by running them through Mathematica. Expectation values and stuff like that. When I say, for example, ...
614 views

### How to extract RGB arguments as a list

Although the following lines of code work fine they are very awkward. My questions are below a = RGBColor[1, 0, 0] b = RGBColor[0, 1, 0] Is there a more compact ...
279 views

### Implement functions that depend on previous value in NDSolve

I want to numerically solve a system of differential equations in Mathematica, say for example $\frac{dx}{dt} = f(x,y,t) \\ \frac{dy}{dt} = g(x,y,t)$ for $x(t), y(t)$. However, the functions depend ...
760 views

### Triangle mapped on a sphere in $\mathbb R^3$?

How can I map a triangle on a sphere? I want to visualize (plot or animate) it for my student in Non-Euclidean geometry. I have no restrictions on the triangle's kind or on the sphere in $\mathbb R^3$....
904 views

646 views

### How to dequantify units in mathematica?

Is there a function which applied to a quantity returns its numerical value so I for instance can fill it into my Predictorfunction?
81 views

### MatchQ failing in some cases with Hold [duplicate]

Could someone clarify why the first of these MatchQ finds a match whereas the second does not? (I'm using version 10.0, in case that matters.) ...