All Questions
88,772
questions
14
votes
0
answers
579
views
Undocumented syntax of FilledCurve [duplicate]
Possible Duplicate:
Undocumented form for FilledCurve[]
A nice trick to get the outline paths of letters is to use the PDF exporter/importer
...
251
votes
9
answers
18k
views
What are the use cases for different scoping constructs?
Mathematica includes three functions that I know of which can be used to effectively (if not actually) define a variable and give it a value within a local scope: ...
22
votes
7
answers
17k
views
How do I replace a variable in a polynomial?
How do I substitue z^2->x in the following polynomial z^4+z^2+4?
z^4+z^2+4 /. z^2->x
...
24
votes
5
answers
5k
views
Plotting an implicit polar equation
Mathematica can use ContourPlot to draw implicit Cartesian equations, but doesn't seem to have a similar function to plot an implicit polar equation, for example
$\...
16
votes
2
answers
419
views
Interfacing Mathematica with MINE using JLink
In last December's Science David N. Reshef, et al. proposed an interesting method to detect associations in data (Detecting Novel Associations in Large Data Sets, Science 334, 1518, 2011). Contrary to ...
57
votes
2
answers
2k
views
How do you set attributes on SubValues?
SubValues, as discussed in a previous question, are declared as follows
...
9
votes
4
answers
418
views
Unexpected behavior from GatherBy in version 7
Bug introduced in 7.0 or earlier and fixed in 8.0.4 or earlier
I have come across what appears to be a bug in GatherBy. It appears similar to the problem of using ...
59
votes
5
answers
2k
views
Placement of Condition /; expressions
It is my practice to place Condition expressions on the left side of := and :> in almost ...
49
votes
7
answers
10k
views
Intersecting graphics
Does the Mathematica graphics system have any concept of intersecting graphics? I've not found much in the documents so far. For example, if I want to show the intersection of two shapes:
...
11
votes
3
answers
2k
views
Is it possible to import dates and times directly as AbsoluteTime and by pass DateLists?
Date and time calculations are quite slow so I am exploring ways to minimize the number of calculations performed. As an example:
...
12
votes
2
answers
402
views
What's a robust way to insert another extension into a filename?
I'd like to add an extension to a filename before the file extension, otherwise leaving the given filename the same. In particular, absolute filenames should stay absolute, and relative filenames ...
15
votes
1
answer
1k
views
Is it possible to use C# LINQ from Mathematica using .NET/Link?
Using Mathematica's .NET/Link (NETLink`) package, is it possible to call out to .NET's LINQ facilities for list manipulation and other operations?
17
votes
1
answer
1k
views
How can I share objects with dynamic content with non-Mathematica users?
Often when I construct some cool Manipulate[] function, I would like to share it with others—non-Mathematica users. Some software, notably Cinderella, ...
7
votes
1
answer
532
views
Operations on online files via public URL access
I need Mathematica to access an online public directory via some URL (fake in this case)
http://example.com/images
and perform operations similar to those Mathematica can do on OS directories and ...
28
votes
3
answers
874
views
What determines the value of $MaxNumber?
What determines the value of $MaxNumber?
$MaxNumber
1.233433712981650*10^323228458
...
14
votes
3
answers
2k
views
Strategies to avoid LessEqual::nord in NMinimize?
When using NMinimize on functions with complex intermediate expressions (but a real end result), quite often one gets the error ...
22
votes
2
answers
776
views
Programmatically copy code so that all output is commented out
UPDATE: The final palette has a new home here! Please test and provide feedback (usability, suggestions, bugs)
A note to the readers and voters: This is intended for community use, so please test the ...
32
votes
4
answers
2k
views
How to use NDSolve to track equilibrium?
I am looking for an extension of NDSolve where integration runs until certain variables are settled at an equilibrium. Now I have a working solution in my sleeves ...
49
votes
1
answer
3k
views
Generating a table of contents
This is my oldest question on SO. It still hasn't generated a useful answer there, so I thought I'd give it a try here.
The question was: I don't seem to be able to find the method to generate the ...
15
votes
4
answers
541
views
How can we implement "Sleep Sort"?
Inspired by Implement Sleep Sort:
Sleep Sort is an integer sorting algorithm I found on the Internet. It opens an output stream, and for each input numbers in parallel, delay for the number seconds ...
14
votes
2
answers
1k
views
How to export to HTML and not lose Grid Frame in the generated HTML?
This is a known issue for me with Mathematica. When I export a notebook to HTML, Mathematica loses some decorations such as Grid Frame lines (in grid and like objects).
For example, creating this ...
22
votes
4
answers
4k
views
Converting a large floating-point number to a single-line string
When I feed a large (or small) enough floating-point number to ToString, it produces a two-line string, with the first line containing only the exponent of 10:
<...
14
votes
1
answer
309
views
Inspecting non-variable state from a breakpoint in Workbench
Suppose I'm stopped at a breakpoint in Workbench, say at one of the y = ... lines in:
...
52
votes
4
answers
5k
views
Saving a notebook as PDF, preserving syntax highlighting
Currently, one may save notebooks as PDFs from the menu by Save As... and then selecting PDF (on a Mac, I imagine it is similar on other OSs). However, the ...
16
votes
1
answer
695
views
How to guarantee that NDSolve correctly detects abrupt changes in parameters?
When using NDSolve, I often have parameters that, in most of their domain, have a constant or null variation, but that suffer from abrupt variations on a very small ...
27
votes
8
answers
5k
views
Fastest square number test
What is the fastest possible square number test in Mathematica, both for machine size and big integers?
I presume starting in version 8 the fastest will be a dedicated C LibraryLink function.
36
votes
3
answers
2k
views
Can a Trie be implemented efficiently?
What is the most space and time efficient way to implement a Trie in Mathematica?
Will it be practically faster than what is natively available in appropriate cases?
30
votes
2
answers
63k
views
How to express trigonometric equation in terms of of given trigonometric function?
How can I express a trigonometric equation / identity in terms of a given trigonometric function?
using following trigonometric identities
...
10
votes
2
answers
643
views
How to generate Intervals from a given list?
If I have a list
list={3,7,4,5,1}
how to get the List of Intervals /Ranges
result = {{1,3},{3,4},{4,5},{5,7}}
12
votes
13
answers
2k
views
How to find range in which a number falls, from given list of numbers?
How can one find the range in which a number falls, from given list of numbers?
...
9
votes
2
answers
623
views
What's the purpose of the Unique function?
As the title says: What's the purpose of Unique?
I understand that it generates some unique symbol, but when and for what is it to be used? Are there applications ...
27
votes
1
answer
2k
views
Visualizing Rubik's Graph
After the August 2010 discovery that the diameter of the Rubik graph is 20, I wanted to make a way to visualize Rubik's graph. Since there are about $4.3 \times 10^{19}$ vertices in this graph, it is ...
15
votes
4
answers
2k
views
Correct way to handle mysterious NaN` result from MathLink function
I have a Mathematica expression that is mapped onto an external C function via MathLink. The external function passes a ...
5
votes
2
answers
326
views
Why is Neptune missing from AstronomicalData?
An old notebook I've recently started working with has a strange error: Prior to version 8, a figure I generated using Drop[AstronomicalData["Planet"],-1] to ...
18
votes
2
answers
656
views
Are later versions of the Front-End compatible with older Kernels?
At my graduate school, all of the clusters still use version-6, and I only have version-7 and version-8 installed on my computer. I would like to use those machines remotely. Are either of the ...
8
votes
1
answer
258
views
Using GraphHighlight interactively
I want to build a small GUI, where the user can select either a single edge or a single node of a graph. I got to this point:
...
7
votes
1
answer
293
views
Inconsistent GraphicsRow behaviour
During the debugging of my previous question (somewhat related), I encountered this strange behaviour: when the global option Antialiasing is set to ...
12
votes
1
answer
1k
views
Antialiasing option behaves weird (polygon edges visible in ContourPlot)
When I set the Antialiasing option in Style, I get the followings:
...
43
votes
5
answers
9k
views
Clear complains that a subscripted variable is not a symbol or a string?
Here's a small listing where I've used EscqEsc to typeset θ in the notebook:
...
11
votes
2
answers
591
views
VertexSize doesn't scale with Graph layout?
I wonder about how I could make a Graph scale automatically when I vary the size of the vertices.
I would like to visualize information with a ...
96
votes
4
answers
9k
views
Functions with Options
Suppose you want to create a function which has optional arguments. Maeder's book Programming in Mathematica covers the topic extensively up to version 3, but some things have changed/evolved since ...
23
votes
2
answers
830
views
Context unique to each group at a specified level
Are there any new tools in v10 that might be applicable to this problem?
Recent versions of Mathematica provide the option of having a unique $Context for each ...
28
votes
1
answer
974
views
Convenient string manipulation
With Mathematica I always feel that strings are "second class citizens." Compared to a language such as PERL one must juggle a lot of code to accomplish the same task.
The available functionality is ...
16
votes
3
answers
3k
views
On coloring the faces of a surface differently with parameter-dependent colors
Old versions of Mathematica ($VersionNumber < 6) supported a particular syntax of ParametricPlot3D[] that allowed for ...
30
votes
4
answers
12k
views
Implementing discrete and continuous Hilbert transforms
What is an efficient and accurate Mathematica implementation of the Hilbert transform, for both continuous and especially discretely sampled functions?
This transform relates phase and amplitude in ...
10
votes
1
answer
1k
views
Prenex and Skolem normal forms
In Mathematica version 7, there was a big advance in logic support ("Boolean computations" is the official name). This was not further developed in version 8.0.
So now we have a fairly robust support ...
17
votes
3
answers
458
views
How can I set Grid alignments using numbers?
There is an example in the Alignment documentation (it also appears in the Grid documentation):
...
64
votes
4
answers
5k
views
How do I evaluate only one step of an expression?
I am looking for a simple, robust way to evaluate an expression only one step, and return the result in a held form.
The definition of a single step is ambiguous, and this itself is probably worthy ...
17
votes
1
answer
4k
views
Combined numerical minimization and maximization
I want to numerically calculate the maximum of a function defined by the minimization of another function, like the following:
...
25
votes
5
answers
1k
views
How can I work out which functions work with SetOptions?
Not all functions seem to work with SetOptions. e.g.
...