16
votes
1answer
617 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, ...
6
votes
1answer
303 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 ...
12
votes
2answers
294 views

What determines the value of $MaxNumber?

What determines the value of $MaxNumber? $MaxNumber 1.233433712981650*10^323228458 ...
13
votes
3answers
785 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 ...
20
votes
2answers
481 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 ...
23
votes
4answers
906 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 ...
33
votes
1answer
1k 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 ...
14
votes
4answers
390 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 ...
12
votes
2answers
819 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 ...
14
votes
4answers
882 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: ...
10
votes
1answer
167 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: ...
25
votes
3answers
1k 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 ...
13
votes
1answer
461 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 ...
11
votes
5answers
1k views

Fastest square number test

What is the fastest possible square number test in Mathematica 7, both for machine size and big integers? I presume in version 8 the fastest will be a dedicated C LibraryLink function.
25
votes
2answers
776 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?
12
votes
1answer
12k 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 ...
7
votes
2answers
219 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}}
10
votes
9answers
518 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? ...
7
votes
2answers
265 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 ...
21
votes
1answer
706 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 ...
11
votes
2answers
488 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
2answers
247 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 ...
16
votes
2answers
379 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
1answer
166 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: ...
5
votes
1answer
154 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 ...
8
votes
1answer
537 views

Antialiasing option behaves weird (polygon edges visible in ContourPlot)

When I set the Antialiasing option in Style, I get the followings: ...
20
votes
5answers
2k 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: ...
9
votes
2answers
252 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 ...
62
votes
4answers
3k 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 ...
17
votes
2answers
329 views

Context unique to each group at a specified level

Recent versions of Mathematica provide the option of having a unique $Context for each cell group, via: Evaluation > Notebook's Default Context > Unique to Each ...
23
votes
1answer
585 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 ...
14
votes
3answers
972 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 ...
16
votes
3answers
3k 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 ...
5
votes
1answer
432 views

Prenex and Skolem normal forms

In MMA 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 for ...
15
votes
3answers
387 views

How can I set Grid alignments using numbers?

There is an example in the Alignment documentation (it also appears in the Grid documentation): ...
35
votes
4answers
2k 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 ...
10
votes
1answer
1k 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: ...
17
votes
3answers
389 views

How can I work out which functions work with SetOptions?

Not all functions seem to work with SetOptions. e.g. ...
3
votes
2answers
194 views

what is the command to make Mathematica beep each time there is an error even for the same command?

sorry for a basic question, but does any one know what is the trick to make the front end beep at me each time I issue the same command (which contain an error)? It now only beeps the first time, ...
14
votes
6answers
455 views

Elegantly pairing up mismatched lists

HistogramList returns a list of bin boundaries and a list of counts. There is one more boundary than counts, and I'd like to pair them up so I can feed it into ...
3
votes
3answers
627 views

Drawing graphics part by part

What I want to do is to draw graphics part by part, because I made a function that generates coordinates according to which I will draw graphics. The problem is that MMA does not operate as I ...
15
votes
2answers
539 views

Constructing functions with variable number of output arguments

In Mathematica, you can construct a function f to have different definitions based on its input arguments. For example, ...
18
votes
4answers
870 views

How to collect result continuously (interruptible calculation) when running parallel calculations?

This is the most common pattern to compute a table of results: Table[function[p], {p, parameters}] (regardless of how it's implemented, it could be a ...
11
votes
4answers
525 views

Strategies for avoiding and handling shadowing

When dealing with namespaces in Mathematica (BeginPackage, $ContextPath ...) one is unavoidably confronted with the problem of ...
12
votes
2answers
181 views

How do you determine the optimal autocompilation length on your system

When you pack lists there is an overhead therefore packing a list with, say, 2 elements is likely to cost more than you get back in efficiency. Mathematica has default list lengths for which functions ...
13
votes
2answers
365 views

SetAttributes[f,Flat]: Why the order dependence?

I'm experiencing a strange phenomenon. Here's a (quite artificial) test case: The following definition work just fine: ...
33
votes
3answers
2k views

Custom package development: Basic steps [duplicate]

Every once in a while, I write a generic function that I use quite often for months to come. However, package development in Mathematica is not very well documented from what I can tell, and I was not ...
14
votes
2answers
2k views

How to represent and manipulate abstract indexed vector (or tensor) expressions?

I have a couple abstract indexed quantities, both differential elements $dx = dx^\mu e_\mu + x^\mu de_\mu$ $du = du^\mu e_\mu + u^\mu de_\mu$ I can compute the expression $(dx + du) \cdot (dx + du) ...
17
votes
3answers
3k views

How to export large graphics?

I'm using Raster to create large graphics (1000 by 1666), which I want to Export as a JPEG or TIFF in a resolution that can be printed in a large size, 3' by 5'. ...
19
votes
2answers
721 views

What are recommended guidelines for developing packages?

This might be of general interest – I have different questions regarding naming conventions, contexts, subcontexts, shadowing, etc., but I do feel that they are closely related, thus I don't really ...

15 30 50 per page