# All Questions

222 views

### Using least independent rectangle area to separate every point

Description I want to add vertical line and horizonal lines between data to make every point have an independent rectangle area. In addtion, every independent rectangle has a number ...
432 views

### Generating an Ulam spiral

An Ulam Spiral is quite an interesting construction, revealing unexpected features in the distribution of primes. Here is a related topic with one answer by Pinguin Dirk, who has provided one ...
314 views

### Nonrectangular region for NDSolve

I have a PDE with mixed boundaries (Neumann and Dirichlet on some sides) in the region $(t,x,y) \in \left( 0, T\right) \times\left\{ -L \leq x \leq L, 0 \leq y \leq h(x) \right\}$ where $h(x)$ is ...
852 views

### Removing empty sets from lists

If I had a list, say, names= {"Andy", "Bob", "Carly", "Sandy", "Jeff", "Tim", "Tom", "Zach"} and I decide to pick a characteristic only a certain of them have, ...
397 views

I have a big system of linear equations $f_i(x_1,...x_n)$ with $n$ variables and $n$ equations. I want to extract the matrix $M$ where $\vec{f}(\vec{x})=M\vec{x}$. For example if I have $$f_1(x) = x ... 2answers 2k views ### Mathematica sporadically crashes on open Sometimes, when I open Mathematica, while the opening splash screen still says "Initializing Kernel Connections", Windows will tell me that "Wolfram Mathematica 9 has stopped working". This will ... 1answer 147 views ### Builder pattern for complex objects construction Intro I was watching "UnRisk-Q Instrument Builder" talk (https://www.youtube.com/watch?v=Xx3goIBpOdE) and those guys use builder pattern to build complex objects like this: ... 3answers 363 views ### Identifying when two graphic objects overlap I'm designing a small demonstration that helps to visualize the reason behind shaping an electrode that is used to probe a surface: ... 1answer 274 views ### Why does Simplify with TimeConstraint return Removed[$$Failure]?

Bug existed in version 7 and is fixed in version 10.0.0 I have a rather ugly Mathematica expression (edit: shown below) that I would like to simplify with a time constraint; simplifying without a ...
1k views

### Linear programming with many variables and parameters

I am trying to reconstruct the answer that is given in this report. (page 153 in Appendix B; Section B.2.1). They are given variables, parameters, constraints, and the objective function to minimize. ...
579 views

### Writing data to a common file during parallel processing

I am executing a loop, and in each loop I have to store a parameter in a file. It is like ...
2k views

### How do I draw a hemisphere?

I want to draw a solid or partially transparent hemisphere above a partially transparent cuboid object in Graphics3D. However, I do not know how to do this s.t. only half the sphere is drawn. Here's ...
528 views

### Mathematica memory management for large arrays

I have come across a weird phenomenon in Mathematica when dealing with large arrays. When generating a list with all the possible subsets of three elements of another list (thus having elements which ...
540 views

### How to stop the Kernel from running wild?

How to abort or stop this (accidently large defined) SparseArray production? s = N[SparseArray[Table[{2^i, 4} -> i, {i, 30}]]] Alt+. or Alt+, seem to give ...
461 views

### Mark an 2d-area on a 3dPlot (ListPlot3d)

I have a list {(IC,s,FK)}, which I use to generate a 3d-plot with the help of the command ListPlot3D. ...
331 views

### Control parameters of different styles of DistributionChart

Using DistributionChart, you can choose among several styles aka ChartElementFunction: ...
549 views

### For[] or While[] can't be used inside Manipulate[]?

Here is a code sample that creates a control object which calculates the expressions inside Maniplate again and again and never stop (it's proved by the code in the ...
198 views

### Built in way to de-list singletons?

Is there a built in method to de-list singleton expressions, like this rule-based solution: expr_ :> If[Length[expr] == 1, First@expr, expr] In data ...
613 views

### Creating and editing new stylesheets

I'm trying to create a stylesheet, but the process has become painful. I'm sure that this has to do something with resetting something in Mathematica everytime I make changes to the stylesheet. To ...
293 views

### Stopping Evaluation of Manipulate after it goes through once

I do quite a bit of textual analysis with Mathematica, and am currently making some Manipulate objects to walk people through key terms in the database. One issue ...
939 views

### Generating figures over remote connection (using terminal)

Recently I've been making movies by having Mathematica create figures and then I combine all of them together using ffmpeg. The problem now is that my macbook is ...
369 views

### Locking a value when Manipulating variables

I'm trying to achieve something similar to Bret Victor's brilliant Scrubbing Calculator in Mathematica. By using Manipulate I'd like to change the values of the variables such that if I modify one ...
1k views

### Force function to make assumptions about its input variables in Mathematica

I'm trying to force a Mathematica function to make an assumption about its input variables. In my case, I'm trying to define a function to return the pdf of a Gaussian. But let's use a simple toy ...
666 views

### Stream CSV files

Ram limitations make import impractical for large CSV files. Is it possible to Stream CSV correctly? ...
1k views

### Simplifying nested If statements

Consider : list = {100,102,103,99,106,107,104,112} I want to consider, extract only the "big moves" of that time series. In this case the moves bigger then 5 ...
1k views

### Bold face formatting for vectors instead of overarrows like latex \mathbf{}?

OverVector can be used to make a symbol look like a vector in text sections of documents. I happen to like bold symbols for vectors better, as in latex ...
356 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 ...
550 views

### How to get rid of Panel margins?

I have a feeling that there is something wrong in general with Mathematica's way of dealing with margins and spaces among/around objects in Graphics, ...
328 views

### Making sure that Timing[] isn't thrown off by caching

In playing with and comparing the various answers to my question here, I tried applying Timing[] to see how fast things ran, but it seemed that some of the answers ...
113 views

### Spacing the elements in a bar chart with error bars

In the Add-Error-Bars-to-Charts-and-Plots How-To in the Mathematica documentation, a function ErrorBar is given: ...
193 views

### Need help with plotting triple data points while xy data are not regular?

recently I plotted some figure in matlab whose quality is not so satisfactory, so I come to mathematica as my supervisor suggested. This is how it looks like in matlab:. In matlab I have three m by n ...
128 views

### Pink Manipulates in stand-alone cdfs

Here is a simple example: Manipulate[Plot[Sin[2 Pi f t], {t, 0, 10}], {f, 0, 5}] This makes a plot with a sine wave of varying frequency determined by ...
114 views

### DeleteMissing level spec confusion

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

### Hardware required to perform large symbolic calculations

I'm choosing components to set up a pc aimed to run large symbolic computations in Mathematica 9.0 under Windows 7 64 Bit Pro. I have a limited budget therefore I'm considering this system: Mother ...
463 views

### Drawing a cuboid with rounded corners

I want to draw a cuboid with rounded corners，like this: RoundingRadius only works with Rectangle or Framed.I have no idea how ...
153 views

### How to modify font for all text fields?

I know that one can modify the StandardForm style so that all input and output codes (and maybe other things too) follow that style. This makes it tricky to make input code different from output code ...
102 views

### Algorithm in RandomChoice[{w1,w2,…}->{e1,e2,…},n]?

I wonder if someone happens to know the actual algorithm implemented in the particular overload of RandomChoice that handles explicitly presented discrete ...
146 views

### Using FunctionExpand to evaluate symbolic derivatives

Some symbolic derivatives of certain special function are not expanded automatically, but FunctionExpand often helps to get a derivative-free closed form ...
164 views

### Random filling of L-length line with l-length segments

I have discrete L-length line filled randomly with 2-length segments so its cover line with gaps 0 or 1. So we can describe cover configuration as sequence of gaps such as {0,0,1,0,1}. How I can ...
288 views

### Flow in pipeline graph

I have pipeline directed graph which has one source and several sinks ...
387 views

### Hatched bars and bar-specific background in BarChart

I would like to diagonally hatch the bars in BarChart and to have three different background colors for the different bars, like this: Any ideas how to ...
2k views

### Need 4D plot (3D + color for function) [duplicate]

I have a function f(x,y,z) of three variables and some constants: ...
471 views

### Integral of the Sinc product

Let as consider the following integral $$B_n = \int_0^\infty \prod_{k=1,3,5,\dots}^n\frac{\sin (x/k)}{x/k}dx$$ By definition, Sinc[x]=Sin[x]/x therefore ...
132 views

### Creating a Block from a list of rules

How can I create a function which works like Block but takes a list of rules as its first argument, rather than a list of assignments? The function needs to be ...
97 views

### Detect when InputField gets keyboard focus

How might I detect when an InputField comes into focus? For example ideally something like this would work. ...
400 views

### Share experiences, preferably the surprising ones, with using ItoProcess

Can people please share their experiences, preferably the surprising ones, with using ItoProcess? I am a big fan of ItoProcess and have already used it for several finance-related tasks, though I ...
285 views

### How do I overlay corresponding values over each frame of an animation?

I recorded a phenomenon using video capturing (phen.avi, imported into Mathematica) and simultaneous measurement of some electrical properties of that phenomenon (a ...
511 views

### Problem with SerialIO package and Lego NXT

I'm following a guide from The Mathematica Journal that describes how to use Mathematica with the Lego Mindstorms NXT but have some trouble getting started and got stuck with the SerialIO package. I ...