# All Questions

65,182 questions
Filter by
Sorted by
Tagged with
4answers
1k views

### SIGSEGV error with 3D Plots

I originally asked this question here but didn't get a satisfactory answer. I am using Mathematica 8.0.1.0 on Ubuntu 11.10. I created a 3D plot from an NDSolve ...
5answers
2k views

### Does every Symbol in Mathematica induce a monad?

From my question about types in Mathematica, I assume that every Symbol in Mathematica is a type if it appears as a Head of some ...
1answer
2k views

### Why does CUDAQ (from CUDALink) download data from Wolfram servers?

I understand why functions like ElementData or CountryData need to download up-to-date data when first launched. However, when ...
4answers
3k views

### What is a type in Wolfram Mathematica programming language?

"Everything is an expression" is a popular citation from many Mathematica guidebooks. So, what is type in Mathematica? How does it relate to common types from Haskell, for example? I did some ...
6answers
14k views

### Replacing composite variables by a single variable

To replace a single variable by another variable, one can simply use the the replace all (/.) operator (e.g., ...
6answers
1k views

### How do I generate the upper triangular indices from a list?

I have some list {1,2,3} How do I generate nested pairs such that I get {{1,2},{1,3},{2,3}} That is, I'd like a way to ...
5answers
41k views

### Plotting Complex Quantity Functions

Trying to plot with complex quantities seems not to work properly in what I want to accomplish. I would like to know if there is a general rule/way of plotting when you have complex counterparts in ...
4answers
912 views

### How to “ignore” an element of Map or MapIndexed

Say I have some function that I'm applying every element in a list to... if that element matches some criteria: ...
8answers
2k views

### Splitting words into specific fragments

I am looking into splitting words into a succession of chemical elements symbols, where possible. For example: Titanic = Ti Ta Ni C (titanium, tantalum, nickel, carbon) A word may or may not be ...
1answer
2k views

### Adding a circle to an already existing drawing

With reference to my earlier post: Adding a point to an already existing graphic I would like to add an outer circle to the whole drawing. This outer circle is a fixed one of ...
3answers
2k views

### Number format of axes in a plot

How can I have a conditional format of the values appearing in the axis of a plot ? I have in mind the number format options available in Excel for plots as described here http://peltiertech.com/...
2answers
24k views

### Formatting legend text font

I am using this code to plot a graph, and I am trying to make the font of the legend bigger. ...
1answer
429 views

### Using the same frame ticks for two different histograms

Consider the following: ...
1answer
3k views

### Google Map in Notebooks?

GoogleMaps are implemented as HTML and Javascript code which can be viewed by a web browser. Is it possible to load this map into the Mathematica notebook, which obviously means for example that <...
1answer
325 views

### Solve[ ] with Method -> Reduce gives a different result than Reduce[ ]

Why does Solve[Sqrt[x + Sqrt[x]] - Sqrt[x - Sqrt[x]] == m Sqrt[x/(x + Sqrt[x])], x, Reals, Method -> Reduce] give a different result than ...
3answers
2k views

### Reading from STDIN, or: how to pipe data into Mathematica

Today I tried using Mathematica's plotting capabilities to display the output of a C++ program. This made me wonder whether it is possible to somehow tell a Mathematica script to read from STDIN and ...
0answers
294 views

### Matrix multiplication involving MatrixForm [duplicate]

Possible Duplicate: Why does MatrixForm affect calculations? I am doing a matrix multiplication, but not getting the desired output. I am doing the matrix multiplication of $A^{-1}B$ from the ...
1answer
251 views

### How do I write a ValueQ function that only returns True if there exists an OwnValue?

Reading the comments in this answer has motivated me to request a full solution to part of this problem. What I'd like is an efficient solution that returns True ...
2answers
593 views

### Conditional Gathering of lists

Just need a little help with the GatherBy / SplitBy function(s). I have a list of random numbers here: ...
2answers
7k views

### Importing from Excel

I'm trying to import a matrix from Excel to Mathematica. My code is: Import["desktop/stproj.xls", "xls", data, 1] The output is some weird stuff about population ...
2answers
371 views

### Parallelization of distinct array write access from subkernels

I'm working on an implementation of a multivariate FFT, which is (or at least should be) highly parallelizable due to the row-column-algorithm. However, i can't figure out how to implement that. The ...
4answers
1k views

### Is there a convenient way to copy/paste text-interspersed SE code snippets into Mathematica?

Is there a way to copy and paste code snippets from SE to Mathematica if these snippets are interspersed with text? Like e.g. in Morphing Graphics, color and location in both the question and answer, ...
5answers
2k views

### Morphing Graphics, color and location

I would like to make a small animation : 1-We start with a random distribution of gray points : ...
3answers
1k views

### Arguments to If[] are not evaluated

I got bitten by the following: f[x_] := 3*x; g[x_] := If[Log[f[x]] < 0, f[x], 0]; g[x] Out[11]= If[Log[3 x] < 0, f[x], 0] where I thought the call to <...
5answers
3k views

### Fetching data from HTML source

I want to generate a couple of plots/graphs with Area 51 statistics. Since Area 51 doesn't work with the SE API, I'm forced to find another way to get the information I want. That other way is with <...
4answers
346 views

### Setting parts of a list

Suppose I have list a = Range[10] {1, 2, 3, 4, 5, 6, 7, 8, 9, 10} in which I want to set some elements to be a list ...
1answer
1k views

### How to properly DumpSave & Get Global`s symbols inside packages while not touching Global context?

For efficiency reasons I prefer to use DumpSave instead of Save. For ease of access I prefer to save symbols in ...
1answer
431 views

### Old values are not freed/garbage collected when you re-evaluate an assignment

For this code: (* Cell 1 *) generate := Module[{x}, x = Range[100 * 1000 * 1000]; x]; (* Cell 2 *) g = generate[]; MemoryInUse[] If I evaluate cell 2 repeatedly,...
2answers
2k views

### How to set the NDSolve method to LSODA

I notice that off all the Method options available for NDSolve[...], LSODA is invoked quite ...
2answers
436 views

### presenting a real number as real instead of imaginary

I have an equation which results in an answer of the form $\frac{i a}{\sqrt{c-d}}$ is there any way to get Mathematica to present it in it's real form? like $\frac{a}{\sqrt{d-c}}$ I know that I ...
2answers
1k views

### How to get string representation (like repr in Python)

I have a string variable. I want to obtain another string which contains the representation of the string variable content itself. s = "a \n b" I need to get a ...
1answer
3k views

### Solve Lagrange multipliers optimization problem

I have two nested solid figure, where $V(a,h,\tau)$ defines the volume and $A(a,h,t)$ defines the surface. The outer solid figure is parametrized in $a_s$,$h_s$ and $t_s$ (they share a common center). ...
7answers
3k views

### Formatting a fraction as a mixed number

Is there a command that will take a rational number and rewrite it in a mixed-number-like form? That is, I'd like to apply a command to something like 10/7 and get ...
1answer
884 views

### Publishing results obtained in Mathematica

I've been using Mathematica to solve nonlinear partial differential equations for my doctoral research for the last 2 years or so. I am not an expert in Mathematica or mathematics and I am an engineer ...
2answers
684 views

### Edge problems in a directed graph

I want to create the following two graphs. So far I tried the following Code ...
9answers
17k views

### How to make an inkblot?

How to effectively create a polygon that looks like a realistic inkblot? So far, I could come up with this (borrowing from Ed Pegg Jr.'s Rorschach demonstration): ...
2answers
202 views

### Calling a function an unspecified number of times

I would like to be able to call a function an unspecified number of times. That is, I would like the generalization of something like: ...
2answers
460 views

### MapThread on a nested Map

A simple problem I am facing is here: ...
1answer
372 views

### Easy Way to Create Trellis Plots in Mathematica

I'm trying to do multivariate statistical analysis on a data set and I'd like to quickly visualize my information first using Trellis-like plots. For example, I'd like to create scatterplots for body ...
4answers
2k views

### Height-dependent filling color in 3D Data Plots

I would like to have the filling of my ListPlot3D display the same color than the one applied to the data. This question makes sense only in the case of conditional ...
2answers
970 views

### Avoiding an unresponsive user interface in OS X

I have found that despite Mathematica's numerous updates, each of which have added much functionality, one fundamental issue remains unaddressed: The unresponsiveness of the UI when I make a mistake (...
2answers
5k views

### What is so special about Prime?

When we try to evaluate Prime on big numbers (e.g. 10^13) we encounter the following issue: ...
4answers
8k views

### Composition: how to make a day and night world map?

Given the following world images: ...
1answer
374 views

### Path queries for tree-structured data

Can anyone suggest documentation or tutorials for developing path queries and indices for (XML-like) tree-structured data? Suppose data is organized hierarchically in key->value pairs, eg: ...
2answers
457 views

### Manipulate Evaluation Order Problem

I seem to be getting some unintended results from a nested Manipulate that I have not been able to resolve. I boiled down the problem I'm having to a simplified ...
3answers
3k views

### Plotting the open ball for the post office metric space

The post office metric space, $P$ has the distance function defined as follows:  d_P (\mathbf{x},\mathbf{y}) := \begin{cases} 0 & \mathbf{x} = \mathbf{y}\\ \Vert \mathbf{x}\Vert_2+\Vert \...
1answer
2k views

### Handling failed FindRoot calls

I want to handle FindRoot calls which did not converge (e.g "thrown" error message FindRoot::cvmit) ...
4answers
1k views

### Change the color of a Locator in a Manipulate

How can I change the color of a Locator in a Manipulate? As an example, consider the following. ...
1answer
568 views

### variable sized lists and using lists as variables

I am trying to scan a parameter space of varying numbers of parameters subject to some constraints (I am interested in any number of constraints just out of curiosity, but in reality no more than 2 ...
1answer
256 views

### Validating simplifications analytically

I have a rather complex expression which I would like to simplify and check my work along the way (Mathematica does not simplify very basic things and it is frustrating me). In the following example, ...

15 30 50 per page