# All Questions

224 views

### Could the PrecisionGoal for NDSolve be a negative number?

The help of Mathematica doesn't say so much about the PrecisionGoal for NDSolve, and I never considered much about it even after ...
176 views

### How to make a package for buttons

I am trying to make a Package for a piece of code though it's not needed here as it is very small. But my actual code here is a little bit different from that ...
618 views

### MapThread over sublists of different length

I have a list which looks like this: l={{1,0,3,4},{0,2},{0,0,1,3},{1,2,0}}. Now I would like to count how many 0s the sublists contain in the first, second,... ...
242 views

### Histogram3D frame ticks with bin text labels rendered in x-y plane?

Is it possible in Histogram3D to substitute frame ticks text labels and have the layout in x-y plane? Starting with a ...
971 views

### Persistence length of a polymer chain

I'm trying to calculate the persistence length (Lp) of a polymer chain using Mathematica. The first and simplest method is to compare the EuclideanDistance between ...
196 views

### How does RootOfUnityQ work?

How does Mathematica's RootOfUnityQ function work? That is, how does Mathematica know if a number is a root of unity? Example: Let $x = \frac{1-i \sqrt{2+\sqrt{5}}}{1+i \sqrt{2+\sqrt{5}}}$. Then ...
1k views

### Cut and paste data from a spreadsheet

I have a set of data points in two columns in a spreadsheet (OpenOffice Calc): I would like to get these into Mathematica in this format: ...
163 views

### StandardForm on Graph edges

The Graph command displays edge labels in TraditionalForm. I instead want to use ...
254 views

### Force VectorPlot3D to show One arrow

I am plotting a curl, and I only want VectorPlot3D to show one arrow, I have tried adjusting VectorPoints-> 1, but the plot show's no arrows at all. Is 2 the minimum VectorPoints I can have? If I ...
531 views

### Fourier series of interpolating function result of NDSolve

I am having a tough time formulating the right question but here goes. I know that solving the pde as in here gives me an interpolating function. I understand that the interpolating function object ...
206 views

### Get unevaluated option value?

This is kind of a follow-up to this question. I want to be able to define a function that takes an option, and then, inside the function, retrieve and test the unevaluated value of the option. For ...
1k views

### Automatically return output using decimals instead of fractions

I have a mathematica file with an algorithm that feeds another program with data. my problem is that some times (randomly) the output is in fraction instead of decimal. The other program (java) does ...
161 views

### Using block or module to free cache

I'm writing some code at the moment that schematically looks like: (set initial conditions for some differential equation for given parameters (M,R,...)) ...
181 views

### Using DynamicWrapper with multiple Dynamics with different TrackedSymbols

I have two variables A and B that are linked such that changes to one causes the other to be updated to the same value. However at each change I'd also like to know which variable cause the update to ...
749 views

### How do I split up a curve into segments of equal length?

I have a curve that is defined as f[x] and what I'm attempting to do is to divide the curve into equal straight lengths for a number of segments of my choosing that I've defined as nSeg. I've created ...
143 views

### How to create an ImagePartition type-of-function that generates parts of different sizes

Background: I partition images to polygons ( squares ) and color them with VertexColors. I want to use a minimal number of polygons while still showing a clear resemblance of the original image. - ...
358 views

### How to work out the parameter in a definite integration which has an exact value while the integration doesn't have an analytical solution?

Here is the equation I'm trying to solve: NIntegrate[1/(E^(1/(λ T)) - 1), {λ, 200, 220}] == 1000 T is the parameter I'm ...
91 views

### MathGraphicsJPanel no output

I am trying to create a Java frontend for Mathematica. Following examples from J/Link guide and looking around the API manual I came up with this code: ...
222 views

### Using the elements of a subset in a Do loop

I would like to use the elements of Subsets in a Do loop. I have: ...
228 views

### Incrementing a nested list element

I've been wanting to increment a nested list element of which I know the "coordinates". I thought of the following procedure, using Apply with Part. ...
97 views

### ProbabilityDistribution PDF on boundary points

I would like to evaluate the PDF of a custom ProbabilityDistribution at the min and max values. However, PDF[...] returns 0 at ...
404 views

### Specifying string patterns in DeleteCases

It seems that DeleteCases is not compatible with string patterns, at least directly (see, for example, this question). Is this true? If so, why is this the case? ...
184 views

### Formatting Framed - some FrameStyle graphic directives don't work?

The FrameStyle option in Framed seems to work for some graphics directives but not others, eg: Framed["yo", FrameStyle -> Blue] But ...
107 views

### Using NumberString, DigitCharacter, or a similar directive to find all string representations of integers in a string

I have a text file containing many, many lines of text like test in the following: ...
997 views

### How to convert an image to a graph and get the positions of the edges?

I am trying to convert an image to a graph. My image is already skeletonized and looks pretty much like this: What I need to do is identify all vertices and edges, and in particular get a list of ...
458 views

980 views

### Pass function or formula as function parameter

I can write either Integrate[x^2, {x,0,3}] or f[x_] = x^2 Integrate[f[x],{x,0,3}] and get the same computation. Suppose I ...
124 views

### Is there a quick way to find a built-in function by name search?

Is there a quick way to search all built-in Mathematica functions by name? Say I want to find all functions whose name contains "Graph", such as GraphPlot, NeighborhoodGraph, Subgraph, and so forth. ...
324 views

### I ran into an error when I was trying to solve a PDE with a piecewise initial condition by NDSolve

This is a very simple one-dimensional heat-conduct equation, the only special part of it is the piecewise initial condition: ...
175 views

### How does bandwidth selection work for low-variance dimensions with KernelMixtureDistribution?

I am puzzled because this toy example (in Mathematica 8) ...