All Questions

Filter by
Sorted by
Tagged with
22
votes
3answers
2k views

How to set focus of a dialog window?

I have a dialog, which, when pops up, requests input from the user. How can I set the window up that the focus is on the InputField of the new window (i.e. the ...
8
votes
1answer
535 views

Stealth daylight saving shift in SQL data

I'm querying a SQL database with DatabaseLink and resulting SQLDateTime objects are shifted by an hour during daylight saving ...
9
votes
1answer
365 views

Suppress Mathematica Kernel taskbar tab when using .NETLink

Is there a possibility to suppress the Mathematica Kernel taskbar tab when accessing it through .NETLink on Windows?
74
votes
3answers
3k views

Syntax highlighting for your own functions

Mathematica has a useful feature that for functions and special constructs getting passed local variables (for example Minimize or ...
8
votes
1answer
564 views

Why does JLink lock unopened jar-files in Windows

Since the introduction of JLink (maybe a bit later) it is possible to put jar libraries inside the directory-structure of packages. If this package is installed in ...
13
votes
5answers
801 views

Probability problem — Rube Goldberg solution?

A user posted this question on StackOverflow which was closed as off topic: 3 people are playing a game with a standard 52 card deck. Each player is given 2 cards each, possible cards and their ...
8
votes
3answers
642 views

Threading a compiled function over multiple arguments of different lengths

I am interested in threading a compiled function over multiple argument lists of different lengths. I will explain this in two steps: Suppose f is some function. Then one can define another ...
11
votes
2answers
342 views

What is this character: [esc][comma][esc]?

What is the character obtained with they key sequence Esc,Esc called? On my front end it is not displayed, but there's something there messing up my input. It's a bit annoying when I'm after a $\mu$ ...
32
votes
4answers
6k views

Is it possible to prerender animation in Wolfram Mathematica?

I have a DensityPlot which is evaluated for a long time. I wish to use it with animation, but it is absolutely inapropriate. Is it possible to render animation ...
9
votes
4answers
571 views

Show path with arrows in a matrix

I have a matrix, for example, 5x5 matrix Partition[Range[25], 5]. And I am given a list, for example: ...
32
votes
1answer
1k views

How are MemberQ and FreeQ so fast?

I would like to understand the implementation that allows MemberQ and FreeQ to be as fast as they are. I noticed this thanks to ...
21
votes
2answers
552 views

Is Compress[] compatible between different Mathematica versions?

Compress[] was introduced in version 6 of Mathematica. It gives a compressed version of expressions represented as a string of ASCII characters. It preserves more ...
29
votes
5answers
7k views

Plotting several functions

I'd like to plot a function of one real and one integer variable, but I don't want them all shown in the same 2-D plot - I'd like to see them as separate curves so I can see both "axes", more like how ...
2
votes
1answer
293 views

Reading from a text file and store the results back into it

I am totally new to mathematica but started learning how to use it. I use the following function to convert a decimal number into its binary representation. ...
22
votes
3answers
3k views

Removing unwanted appearance of underlying mesh

Let us first define two positive definite matrices: M1 = {{2, -6}, {4, 8}}; M2 = {{2, 3}, {4, 8}}; then set two points ...
7
votes
2answers
700 views

How to overload System`StringJoin 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 ...
4
votes
2answers
1k views

Single dot textual form

How do I render a letter with a single dot above it? I see \[DoubleDot] and \[TripleDot] are readily available, but what about ...
19
votes
5answers
13k views

How to change default notebook background color?

How does one change the default notebook background color?
13
votes
1answer
24k views

Function that takes another function inside

Looking at this QA, I'm trying the following - 2 functions (r in vector format) using Theta { A, 2 } functions (sorry for the inconsistent names...). ...
7
votes
2answers
570 views

How do I prevent auto loading of blank notebook at startup?

I'm using Mathematica 8 with operating system Mac OS X Lion. When I open Mathematica it always loads a blank notebook. I don't want it to load anything by default. In the Preferences pane there ...
10
votes
1answer
271 views

Mouse gestures or keyboard shortcuts for navigating forward/backward in the documentation center

Is there any way to get gestures (e.g. trackpad- or Magic-Mouse-swiping left/right) to work for navigating forward and backward in the Mathematica help browser, particularly on a Mac? If not, what are ...
50
votes
9answers
2k views

Items known by CurrentValue

CurrentValue can be used to poll the state of numerous system values such as the mouse position. Its help page doesn't list all possible items, though. An item like ...
15
votes
3answers
3k views

Why is ContourPlot not displaying this curve?

I am using the general form of a second-degree plane curve: $$Ax^2+2Bxy + Cy^2+2Dx + 2Ey + F = 0$$ I want to randomly generate plane curves of this form, so I am using ...
18
votes
1answer
611 views

How to create interrelated sliders?

Say I want a slider that controls the value of $x$ and another slider that controls the value of $2x$, how would I go about it?
20
votes
2answers
2k views

How to make a parallel auto-generated .m package from Initialization cells?

according to the documentation at ref/InitializationCell, When you first save a notebook that contains initialization cells, you have the option to make a ...
13
votes
3answers
2k views

How do I change the Font in BarChart Legend?

Just wondering if anyone knows the proper Syntax to change the Text properties in the BarChart's ChartLegend. I cannot seem to figure out how to get Style[] to apply. Here is an example: ...
8
votes
2answers
1k views

How do I view initialization (or other invisible) cells in a notebook?

I am looking at someone else's notebook, and when I go to evaluate it, it asks whether I want to evaluate the initialization cells. I would like to look at them first, but "I do not see them here nor ...
24
votes
3answers
12k views

Most Efficient Way to Calculate the Product of All Items in a List?

Say that I have a list of returns on a financial asset over time and want to know the total compounded return. To get the answer, I need to add 1 to each return and then calculate the product of all ...
29
votes
2answers
3k views

How can I set the speed of manipulate play button?

Can you set the speed at which a Manipulate plays when the play button is clicked?
21
votes
9answers
3k views

Selecting a sublist based on Length

If you have a simple list of lists as follows: test = {{1, 2}, {4, 5, 6, 7}, {5, 4, 3}} How do you ask Mathematica to return the sublist of greatest length? I'...
17
votes
3answers
2k views

Background image in a polygon / CountryData

Is it possible to use a background image in a polygon without rasterizing the polygon? I tried with textures, but they seem to be viable only for simple polygons. I want to put a flag as the ...
15
votes
10answers
630 views

How to neatly get the sum of symmetric elements in a list?

The task is to compute symmSum[{a, b, c, d, e, f}] (*==> {a+f, b+e, c+d} *) symmSum[{a, b, c, d, e}] (*==> {a+e, b+d, c} *) My clumsy solution is ...
31
votes
2answers
2k views

How do I extract the contents of a selected cell as plain text?

My aim is to extract the contents of an Input cells as plain text. Ideally I would like to be able to select one or more Input cells and press a button which would then extract the text from these ...
10
votes
2answers
527 views

Default position and size of front-end windows (in Windows 7)

I'm running Mathematica 8 on Windows 7. When I start the Mathematica front end, I would like the menu bar and the blank notebook that opens to appear at a different position and with a different size ...
32
votes
1answer
1k views

Customizing syntax highlighting for private cell styles

Is there any way to set up a cell style with a particular syntax highlighting? For example, I'd like to have a CProgram cell to write in blue the C special words. I have done it by setting ...
42
votes
4answers
4k views

Can Mathematica be regarded as a software prototyping environment?

I am an undergraduate student, starting to use Mathematica to model simple physical chemistry problems, as a prelude to a summer internship in a computational/theoretical chemistry group. The solution ...
35
votes
3answers
8k views

How to set default magnification for all windows

This is certainly a newbie question but I could not find the answer by searching. I am using Mathematica 8 under Windows 7. I want to use default magnification of 150% for all notebooks and help ...
19
votes
8answers
911 views

How can I remove B -> A from a list if A -> B is in the list?

I have a list of transformations like this: list = {"A" -> "B", "B" -> "A", "C" -> "D"} As this is used to plot an undirected graph with ...
26
votes
3answers
21k views

General::ivar is not a valid variable when plotting - what actually causes this and how to avoid it?

I was just evaluating a couple of expressions and started to get errors like this: ...
42
votes
5answers
12k views

ListPlot with each point a different color and a legend bar

I would like to generate a ListPlot with the color for each point in the plot corresponding to a particular value (not associated with the position in the plot). I'...
8
votes
4answers
330 views

Check in a series if there exists adjacent values with less than a certain number of missing values

I'm working with a large number of series of different experiments, where there exist a lot of experiments where there are no entries. I now want to draw a sample where there should exist at least ...
38
votes
6answers
11k views

How to Delete Elements from List1 appearing in List2?

I'm new to functional programming of Mathematica and trying to remove one list of assorted elements from another. However I only find functions working with the Index rather than the values itself: ...
3
votes
1answer
344 views

Feed a Manipulate[] Output into a Graphics[]

Please consider : ...
23
votes
7answers
2k views

Permutations[Range[12]] produces an error instead of a list

This input: Permutations[Range[12]] Results in this (error) output: ...
18
votes
2answers
1k views

Custom Mathematica Shortcut: Copy as $\LaTeX$

If you edit the Wolfram Research\Mathematica\8.0\SystemFiles\FrontEnd\TextResources\Windows\MenuSetup.tr file you can make Ctrl+Shift+C copy not plain but in $\...
63
votes
7answers
17k views

What Mathematica book to buy?

I have used Mathematica for several years but at a pretty low level - piecing together built-in function inefficiently and fearing the sight of # and &'s when I see others use them (I never do). I ...
6
votes
2answers
514 views

Unit testing J/Link projects in Workbench

I am having some problems setting up the MUnit testing framework for a J/Link project and would be grateful for advice. I do have J/Link working when running or debugging the .nb notebook in ...
32
votes
2answers
2k views

How can I use the Klingon alphabet symbols?

Note: This functionality is presently missing. See: How to add named characters to Mathematica 10? Mathematica apparently supports the Klingon alphabet: ...
28
votes
2answers
3k views

Pattern to match a non-empty list of non-empty lists

Is there a pattern to match a list of lists, containing at least one list, with each list containing at least one element? In the Mathematica documentation it says that the pattern ...
5
votes
1answer
403 views

How to fix errors in Gram-Schmidt process when using random vectors?

I first make a function to get a random vector on unit sphere in a swath around the equator. That is what the parameter $\gamma$ controls; if $\gamma = 1/2$, the vectors can be chosen anywhere on the ...

15 30 50 per page