# All Questions

371 views

### How can I suppress Print in parallel evaluation?

When using a function that includes Print statements, one can suppress the output by ...
283 views

### n-fold symbolic integral in Mathematica

I am trying to compute symbolically a n-fold integral (n is a parameter of a function) over, say, the cube [0,a]^n. My code looks like this ...
2k views

### Plot Indefinite integral

I'm having a hard time to find a solution to a numerical limitation on mathematica: ...
855 views

### Defining an integer-valued function on an integer domain

This should be an easy question! I want to define a function with domain = the 12 integers {1,12}, with the values f[1]=31, ...
4k views

### Product of elements within a list

Please Consider : list={{5,2,6},{2,8,3}} I need to get the product of all the element within list : As of now I do this : ...
41 views

### How can I download a tweeted image given the tweet id?

ServiceExecute[] supports sending an image via "ImageTweet" i.e. posting an image in a tweet. But how can I achieve the reverse of this and download the image given ...
117 views

### Calculate pixel intensity in two regions

I am just beginning to learn about image processing. I would like to know 1) How to show an original image with a visible mask of an arbitrary shape? 2) how to calculate the pixel intensities in the ...
85 views

### How to prevent Round with hided fractions

I found a strange behavior in Round. If we try: ToString[Round[4.811, 0.01], InputForm] we get: 4.8100000000000005 When I expected 4.81 In order to ...
191 views

### Solving a system of nonlinear equations 2

Regarding this question: Solving a system of nonlinear equations When I try to solve the same system (with the code proposed in Daniel Lichtblau's answer) with different Right Hand Side values, ...
150 views

### How to use the same PlotRange and the same PlotLabel size for a sequence of Graphics?

I wish to use ListAnimate to show a sequence of plots with different plot ranges and differently sized plot lables, all unknown in advance, in a way that keeps the ...
84 views

### Problem with NumberForm when exporting

I have a two-part question regarding NumberForm First question In my attempt at answering this i stumbled upon a strange behavior by NumberForm when the final result is exported. Lets say I ...
222 views

### How do I feed data points into an equation to solve NUMERICALLY?

I start with this equation and solve it numerically for $z(x,y)$ in the range $1 < x < 5$ and $1 < y < 5$: $$\frac{3}{xyz} - 2x - 3y - 5z = 0$$ Then using the data points of $z$ above, ...
150 views

### Finding the minimum of a function

I asked this question Mark Minimum Value in DensityPlot. Another question has come up, or better said, a task: Find the minimum of a function. I haven't been able to write the needed code for that, ...
118 views

### ListPlot with conditions

I have a data file containing the position of about $10^5$ stars of a spiral galaxy. Here is the plot and this is the corresponding code ...
206 views

### How do I exclude the vertical line plotted at a discontinuity?

Condsider function = Tan[1 x] + Tan[2 x] Plot[function, {x, 0, 1.5}] It has a strong discontinuity around 0.8. The problem is , if I want to find ...
189 views

### How to enter chemical equations?

When I want to take chemistry notes and write down a formula such as H_2O or C_2H_5OH it enters "Math mode" which changes the font size and italicizes the letters. Is there an easy way to properly ...
84 views

### Can I change the font of all elements in my barchart with one property?

I have this BarChart: created with this code: ...
125 views

183 views

### Permuting elements within a list

I have s = {2, 3, 5, 7, 1, 4, 6} (* always with diffente elements in {1,2....7}*) l = Length[s] n = 3 and n tells us that we ...
216 views

### Differential Equation in Complex Plane and Parametric Plot

I would like to solve $dx/dt=\sqrt{1 + (I x)^3}$, where x is complex, for some initial condition like $1 - 5 I$ and plot the imaginary part of the solution versus the real part. (A somewhat similar ...
78 views

### ReplaceAll in an expression including large InterpolatingFunction

I have a large InterpolatingFunction that I'm transforming to another basis with a few simple multiplications and additions by (symbolic) constants. The ...
72 views

### How to make the code inside Compile conciser without hurting performance?

Consider the following sample: ...
156 views

### Manipulate for variable number of sliders

I'm trying to use Manipulate for plotting multidimensional data, where higher dimensions are defined as sliders. First, this simple example works: ...
217 views

### Area between Contours in ContourPlot

I feel slightly foolish for asking this because I am so close, but I'm having trouble, so I will anyway. I asked this question two days ago regarding finding the lengths of contours. Now, I'd like to ...
95 views

### How do I constrain movement for lists of Locators using 2nd argument of Dynamic?

I need to display edge labels of a graph in a way that allows the edge labels to be moved. Locator seems the simplest and most obvious function to use. My ...
178 views

### Dynamically Updating Function

I use Mathematica 8 and am working with DynamicModule. I'm trying to enter a function in an InputField then later apply it to two values entered in subsequent Input Fields. The function just does not ...
149 views

### Modular surface of tri-focal cassini curve ContourPlot3D missing feet

I am wondering why the following fails to cover the surface at points near k = 0. ...
123 views

### adding vectors of unequal length [duplicate]

If I have hundreds of vectors of unequal length that I need to sum, what is the cleanest way to do so? So, if I have as input inp={{a,b,c,d},{e,f,g},{h}} I want ...
180 views

### Render dynamic Graphics objects static

As was discussed in the comments of another question (MathLink Graphical Output (Plots) to File), Graphcis objects produced by commands such as ...
139 views

### Plotting lists, exact color values

I read some descriptions of similar problems but I cannot make them work in my example, I don't know why. I have list of 3 dim values to plot: x, ...
282 views

### Enter exact rational numbers easily with decimal notation

Is there a simple way to enter decimal numbers such as 0.123 so that Mathematica interprets it as an exact rational number 123/1000?
238 views

### Replacing values above a threshold with 1 [duplicate]

I have a list with some values and I want to replace a value which is greater than 1 with 1 otherwise keep the value. In this case 10562: ...
381 views

### Estimating a distribution using binned data

I have data from which information has been irretrievably lost through binning and I am trying to find a plausible distribution from which it derives. There is an academic paper suggesting that the ...
281 views

### Can Mathematica identify formulae or sequences of numbers?

Can Mathematica suggest what a formula means? For example if I input $$\sum_{i=0}^n i$$ can it infer that this is a sum of integer values from $0$ to $n$? Or if I enter $0,1,1,2,3,5,8,13$, can ...
86 views

### NotebookWrite Cell with Grid

I'd like to NotebookWrite a Cell in StandardForm with a ...
201 views

### How can I merge multiple sets of morphological components (perhaps selected using different metrics)?

Let's say I use SelectComponents to select morphological components in an image according to some criterion, like "Elongation". Then let's say, I pull out a ...
113 views

### Function to differentiate between date pattern and specific string format

I'd like to write a function that behaves one way when the argument is a Mathematica date, such as {2013,12,15}, or with added hours, minutes and seconds if ...
1k views

### System Modeler can't find g++ in Mac OS X Mavericks

I've just purchased SystemModeler (Mac OS X Mavericks) but can't verify the g++ compiler path. I assume it's in the Xcode package but nothing I've tried seems to work, for example, ...
433 views

### Locator to show coordinates of plot

Old I would like to make the locator follow a plot, giving the coordinates as it moves. I don't really know where to start with this one, but I would like the dynamic plot to look something like ...
144 views

### How to make an efficient difference of sets function?

How to write a nice code that removes all elements from given set A, that occur also in set B? I would like to use DeleteCases[] for this purpose, but have no good ...
301 views

### Finding maximal sublist of linearly independent vectors

Given a list of vectors v = {v1, ..., vn}, which is the fastest way to find a maximal sublist of linearly independent vectors? I could add the vectors one by one to ...
179 views

### Transform Piecewise[] into sum of indicators

I'm interested in transforming a piecewise defined function into a sum of indicator functions, ultimately with the aim to be better able to integrate them. As an example I would like to transform the ...
135 views

### Delay of events detection dependent of “MouseDown” position

Let's say we have a Rectangle with color which depends of CurrentValue["MouseOver"]: ...
145 views

### How to embed graphic-element-specific metadata within a Graphics object?

One of the most crucial requirements for rich, interactive scientific graphics is being able to "annotate" individual graphic elements (e.g. the data points of a scatterplot, the individual curves in ...
84 views

### Constrain movement of Locator

Continuing the discussion started in the thread here, I've tried to recreate the code from scratch. I thus looked to constrain the movement of a locator to the graph defined by ...
109 views

### How to define a function of z[bar], etc

Using Displaying index as subscript on output: e.g. C[i] -> C_i with Notation[...] or Interpretation[..]? I have often ended up wanting to define functions of annotated variables to better match my ...
193 views

### Reducing quality of Graphics3D scene to improve performance?

ProteinData["SERPINA1", "MoleculePlot"] gives the detailed Graphics3D plot below. I'd like to make many small copies of this ...
Why is Mathematica plotting a horizontal line at $y=2$ in the following example: ListPlot[Table[i,{i,1,10}],Frame->True,GridLines->None] How to get rid ...