# All Questions

508 views

### Best way to modify values in a list of rules?

Recently I had to solve a problem similar to this: Let's say I have a list of list of rules ...
177 views

### Evaluation order of Button[]'s action

it looks like it should be well known issue but I haven't found answer anywhere. Please tell me why the result (after clicking) of this: ...
398 views

### Why use Column with Rows instead of Grid?

In general, what are the advantages of using Grid versus a combination of Column and Row? Is Grid better in some situations but not others? For example, is there any reason why one would do this: ...
618 views

### How to label the Vertex and, or Edge labels with their weight

I noticed that the Mathematica 9.0 documentation only mentions the usage of "Name" to label the vertexlabel or edgelabel in the Graph. Is there an option to use the Weights automatically just as ...
248 views

### Forming Cone with Tube fails to work in version 9.0.1

I use two different radii in a Tube expression to draw a cone. I know for a fact that this worked in Mathematica 8, but when I reevaluated my code in versio 9.0.1 ...
4k views

### Image processing: Floor plan - detecting rooms' borders (area) and room names' texts

Here is a simple building floor plan. I would like to derive the rooms as (rectangular) components and the names of the rooms. This is very common representation of building floor plans. The ...
2k views

### Compare C++ Standard Library's Mersenne Twister with Mathematica's Mersenne Twister

The C++ standard library does contain a set of random distribution classes, among other things a Mersenne Twister engine. What I'd like to do is to generate the same random number distribution, using ...
85 views

### Plot axes invisible when projected

When I save plots made in Mathematica in PDF format and then insert them in a presentation (e.g., in Powerpoint), the plot axes are invisible in the picture created by the projector. Is there a way to ...
768 views

### How to clear parts of a memoized function?

I have a function of two variables, e.g.: f[a_, b_] := f[a, b] = something f[a - 1, b - 1] etc With the above code I used the concept of memoization to speed up ...
221 views

### Is there a way to teach integrate new solutions?

I have an integral which I can solve, but integrate cannot: ...
147 views

### An issue with formulas typesetting in Grid & Column

I tried to construct a small sheet with text and equations presented in a convenient publishing form, using Column: ...
250 views

### How do I get a list of allowed values for an option?

When using Mathematica how can I get a list of the allowed values of an option? As an example I can use the Options command as follows - ...
268 views

### EventHandler {“MouseDown”, 1} with PassEventsDown -> True not working as expected

I want my EventHandler to respond only to left mouse clicks and pass the right mouse click to the built in event handler. I have tried ...
690 views

### How to play microtonal music using Mathematica?

I am trying to model microtonal music using Play. I have only partial success because it takes such a long time to make some sound. Could you please have a look ...
363 views

### Integrating hat functions

I am trying to integrate a hat function for a project that I am doing and have found a method to do so but I find it sloppy. Currently I have the basis function ...
288 views

### How can I get WhenEvent to recognize criterion I specify?

Using NDSolve I want to solve a differential equation till a quantity which is a function of the dependent variables reaches a certain value. My functions and criteria are complicated, but I am able ...
433 views

### Can I customize a TradingChart?

What I would like to do is generate a chart similar to the TradingChart but to have two lines on it instead of the candlestick. The lines I want to plot will look something like this; And what I ...
900 views

### Load a Mathematica Package via .Net code

I'm using C# to pass data to Mathematica and return graphs: ...
1k views

### Exporting interpolating functions to excel

I have a question about exporting an InterpolatingFunction to excel. I checked the forum, but I still couldn't completely understand how to solve my problem. Could someone help me with this problem? ...
518 views

### Projecting image or contour plot on xy-plane of Histogram3D? [duplicate]

I've generated a simple 3D histogram, where the x-y coordinates corresponding to the "location" of an event defined on a simple 160x160 grid, and the z-axis height is simply the count of events that ...
539 views

### How do I solve N simultaneous equations for N variables?

I have a function: f[x_] := x + 31 x^3 + 5 x^25 Which I want to find an expansion for: ...
546 views

### Function argument to default under certain condition

Inspired by this and this question (and how I handle this in practice), what is the best way to default a function value when a certain condition is met? For example, if a function is defined as: ...
199 views

### Integer partitions in all orderings

I want to partition an integer into $k$ integers all possible orderings. This can be done in the following way ...
113 views

### Strange behaviour of variables in Table

I'm trying to work with some vectors and have run into a strange problem. An obvious way to define a difference of two vectors would be dif[x_,y_] := x-y I ...
413 views

### Finding all points of period n in an iterated map

I'm trying to implement an algorithm of Jenkinson and Pollicott to calculate the Hausdorff dimension of a Julia set for the map $f_c : z\mapsto z^2 + c$. It's described on page 40 of their paper, ...
486 views

### Exporting 2D graphics to DXF

I have a design that I've produced in Mathematica, consisting of two sets of Rectangle objects. The second set is a mirror image of the first and was produced with ...
75 views

### Accessing files in different directories [duplicate]

I have a problem that I am trying to work on. My Folder structure is like this. Application(MainDirectory) AppData( Secondary directory where files are Design.m, Layout.m, and Evaluation.m) ...
86 views

### Get unique values for integration limits

For an multidimensional integration I want to build up the integration limits with the following code. (the length of vars is also variable) ...
508 views

### Why is Mathematica limiting the execution time of my calculation? [duplicate]

Is there a Front End option (or programming option) in Mathematica 9 that limits the amount of time that functions take to execute? I have a function (as part of a Mathematica Application) that shows ...
619 views

### Styling individual bars in a BarChart with grouped data

Consider the following: ...
449 views

### How can I decimal-align tick labels at the left?

I use the CustomTicks package, because the built-in tick labeling leaves a lot to be desired. Even just putting the tick marks on the right instead of the left is ...
438 views

### Symbolic derivative of $n$-term product

I want to determine the relationship that must exist between the $x_i$ and $y_i$ such that $$\frac{\partial}{\partial\theta} \prod_{i=1}^n \frac{f(x_i,\theta)}{f(y_i,\theta)} = 0,$$ where  ...
1k views

### Finding the likeliest path in a Markov process

With Mathematica 9, we have the addition of various processes, among which the discrete Markov process. Given a transition probability matrix m, such a process is ...
177 views

### Cell output controlled by CellFrameLabel Checkbox?

The following generates a Cell that returns the state of the checkbox when evaluated: ...
584 views

### Behavior of expression evaluation in Plot

I'm confused with Mathematica's way of parsing expressions. I've been struggling with this for a while and never found an exhaustive answer, sometimes things don't parse the way I think they would ...
912 views

### Passing large list by reference

I have the following problem: I would like to control evaluation of a variable that points to a list. For example, frequently in the code I have functions of the form that are supposed to work on ...
316 views

### Is there a way to programmatically set global preferences?

Can I set global preferences that are accessible via "Edit"->"Preferences" programmatically from within a notebook? As learned from this question, turning off anti-aliasing can make a huge difference ...
353 views

### Why do Mathematica and MathKernel need “incoming connections”?

My firewall (the "Application Firewall" in OS X 10.8.2) detects that Mathematica (9.0.1.0) and "MathKernel" both request incoming connections. My configuration expects all incoming connections to be ...
612 views

### Find Roots in Do loop

Task: Finding roots in loop t = List[1, 2, 3, 4, 5] fx[x_] := a*x^2 - 5 List[Do[Print[FindRoot[fx[k] == 1, {a, 1}]], {k, 0, 5}]] Output: Currently the output is ...
556 views

### Built-ins for discrete ArgMax or ArgMin?

Wondering whether there are discrete versions of ArgMax / ArgMin, that is, something that will find the part of an expression at ...
133 views

### Series command no longer expands arbitrary functions after aborting previous evaluation

I asked Mathematica 9 to execute the SeriesCoefficient command on a rather horrendously complicated expression. After some time I decided to abort the evaluation ...
556 views

### Read and filter a text file without importing

I have a large text file of a million sections. Each section contains A lines of header and B lines of numeric data. I want to read the first and last line of B from each section (to have a list of 2 ...
876 views

### Find the parameter values satisfying conditions for all roots of an equation

Hi I'm very new at Mathematica. My real problems concerns a much more difficult equation with many parameters, but I want to check that the method is good, so I made up a test equation. My test ...
165 views

### Most efficient way to output a cycle starting from an unordered list of graph vertices

I have some graph $G$ and a list of vertices $(v_1, ..., v_N) \in V$. Using graph structures in Mathematica version 9.0, what is the most efficient way to determine whether or not $(v_1, ..., v_N)$ ...
1k views

### Pass list of options to Plot3D

Consider the example plotOptions = {PlotPoints -> 10, MaxRecursion -> 2} Plot3D[x y , {x, 0, 10}, {y, 0, 10}, plotOptions] Why does this causes the error: ...
266 views

### Listable compiled function using Map

I'm trying to minimize the computation time of problem which is too long to post. I use compilein order to gain some speed. To increase speed I would like to use ...
133 views

### Determining End of Notebook with Mathematica 9

The application package I had working in Mathematica 8 no longer works in Mathematica 9. I believe the problem lies in how I cycle through cells and test for reaching the last cell of the notebook. ...
813 views

### Approximately Fit Data Without FindFit

I have some noisy data, and I'd like to analyze the derivative of the function the data approximately matches. Interpolation is normally great, but doesn't work ...