# All Questions

7 views

### Automatically lining up two images that have some common elements

Over on genealogy.SE, I proposed a method of manipulating images to make "bleed through" less visible and the handwriting on the correct side of the page more legible. Here are the original images: ...
6 views

### Show the arrows in a plot

I have two plots: ...
4 views

### Simple Choice-Dialog like the auto-completion popup

What I want is pretty simple, nevertheless, after half an hour I have only unsatisfying solutions here. Let me ask you who might work more often with Mathematica's GUI elements: Is there a way to ...
8 views

### Overwriting first line of large file

As mentioned, I wish to read the first line of a file, and if needed, overwrite it with a new string. The aim is to have a CSV with a list of possible elements. Example: ...
18 views

### Export Plot to formatted data file

I would like to export the point drawn on a graphics made with Plot, to a file formatted in such a way to be importable in Mac Grapher. If I use Export, and I specify a .txt, it give me something with ...
22 views

### PlotMarkers problem in ErrorListPlot, Mathematica 10

I recently upgraded to Mathematica 10, very excited about the multiple undo function of course. However I very quickly noticed that if I specify a setting for ...
18 views

### Minimum and maximum values under conditions

Let's create some sample data ...
20 views

### Code Refactoring

I am just beginning with Mathematica and I have received this code to understand. I am not able to follow this particular section. I have tried looking it up on many forums, with no answer. Can you ...
25 views

### Is it possible to plot a second-order curve by its non-canonical equation?

I have this second-order polynom: $$6xy+8y^2-12x-26y+11=0$$ And I need to reduce it to a canonical form of a second-order curve. I solved this, but is it possible to draw a plot of the original ...
37 views

### How to automatically plot asymptotes?

I'm a newbie to Mathematica and I'm reading through "The Student's Introduction to Mathematica, Second Edition" and am on the "Using Mathematica’s Plot Options" section of chapter 3. The examples for ...
54 views

### How do I solve for one variable in terms of other variables in Mathematica?

I'm fairly new to Mathematica, and I'm trying to solve a complicated equation with multiple variables. I've tried the following... ...
27 views

### Elements in Reap and Sow

Can someone help explain it to me: How does here e come out? Why b disappears? ...
29 views

### GUI->Text code conversion

I have to solve about 30 symbolic equations simultaneously. Mathematica is taking more than 24 hours to solve it on a 6 core system and now I have to run that on a cluster. In order to do so I need to ...
36 views

### How do I constrain variables to a user-defined domain in ArgMax?

I am trying to ArgMax a function over x, but x is only defined between ...
97 views

### What is the natural way of using Dataset to get a FittedModel?

The new Dataset in Mathematica 10 is a great addition to the language, potentially reducing the convenience gap with R. Given this, I would like to understand what the equivalent simple or natural ...
47 views

### Express a complex function $f(z)$ as $u(x,y)+iv(x,y)$

How can I write a complex function $f(z)$ in the form $u(x,y)+iv(x,y)$ using Mathematica? Re and Im do not work, because they do it for complex numbers, not functions. For example, if I try ...
62 views

### Integrating Mathematica in Blackboard

I teach Economics at University. I often use Mathematica to generate interactive diagrams with demand and supply curves. We also use Blackboard (blackboard.com) to manage our subjects, including ...
20 views

### What to do when an “error-free” compiled function uses MainEvaluate?

Consider the following code: ...
49 views

### Manipulate gives the output as a blank plot, but I'm not sure why

I'm using Mathematica 9 to try to manipulate a 3D plot. My code is: ...
47 views

### How to insert zero counts uniformly with Dataset Counts query

Missing[] is generated when an association does not contain the specified key. ...
108 views

### Creating a new list by dropping sub elements of the original list

Suppose I have a nested listed as follows, {{{1,2},{3,4,5},{2,3}},{{2,3,4},{5,4,1},{1,4,3}},{{3,4,5},{3,4,5}}} Where the elements are, ...
93 views

### Using select to pick out elements of nested lists in an odd way

Suppose I have a nested list such as, {{{A, B}, {A, D}}, {{C, D}, {A, A}, {H, A}}, {{A, H}}} Where the elements of interest are, ...
34 views

### How can I append associations with uneven elements? [duplicate]

My dataset is pretty simple so far: ...
59 views

### Symbolic matrix calculus: What's new in Version 9

I have seen some of the related posts, which ask about doing matrix calculation on tensors unknown dimensions. One of the posts mentioned that version 9 has some capability, but it was concerned about ...
45 views

### Exporting an overlay of two plots

I have a ListLinePlot and I'm trying to place a close-up of a specific range in the ListLinePlot. Using overlay I solved this problem with: ...
237 views

### How to create a screen shot of a notebook

I would like to use Mathematica programmatically to take snapshots or screenshots of any open notebook. For example, I would like to get from the notebook created with this command ...
151 views

### Sum with Levi-Civita

I'm trying to write the expression $$\sum_{\alpha,\beta = 1}^{4}\epsilon_{\mu \nu\alpha\beta}a^{\nu} b^{\alpha} c^{\beta}$$ in Mathematica, where $\epsilon$ is the Levi-Civita symbol and $a$, $b$, $c$ ...
44 views

### why the variable scope is not local when using evaluate to plot multicurve?

I noticed a surprising problem when using evaluate to plot multicurve, "evaluate" function actually consider global variable first, not the local! I can illustrate the problem using the following ...
43 views

### NDSolve fails to solve vector-valued function x'[t]=a.x[t]+u.b

I get no solution when I run the following command: NDSolve[{x'[t]==0.{{0},{0},{1.}}+{{0,1.,0.},{0,0.,1.},{0.,-0.156816,-0.523512}}.x[t],x[0]=={0,0,0}},x,{t,0,1}] ...
301 views

### Is there a function for nearest power of 2 in Mathematica like nextpow2 in MATLAB?

I am looking for something like nextpow2 in MATLAB like this: P = nextpow2(A) returns the exponents for the smallest powers of two that satisfy $2^P \geq\left|A\right|$.
60 views

### Check for holomorphy of a function

Given a (rather complicated) function H(z), what is the best approach to check symbolically whether it is holomorphic? What I tried is checking explicitly the ...
89 views

### Intersection of lists of disjoint intervals

Here is my problem: I have two very large lists of intervals (stored as many couples in the form {{"start point", "end point"}, ..., {"start point", "end point"}), ...
48 views

### FindDistributionParameters of a sum of a mixture distribution

I have this Mixture Distribution of two Normal Distributions: ...
20 views

### Is equation numbering in exported HTML considered deprecated for built in stylesheets?

So I've been tinkering around with the built in stylesheets and the Export command and I've noticed that in principle equation numbering should work. When you look ...
32 views

### Needs entry point of a package from a Mathematica script

I am writing a bunch of Mathematica scripts to run command line in a HPC environment. I am organising my solution in small chunks I can test separately. So I have a directory structure like: ...
83 views

### Solving an Equation (Recursively)

I have the following Values: $a[0]=1;a[1]=0;a[2]=0;a[3]=0;a[4]=\frac{g_2}{20};a[5]=0$. I need to compute the value of $b[n]$ in the following equation a[n]=\sum _{m=0}^{n} (m-2) \;\;a[m] ...
157 views

### Controlling the placement of the y-axis

I use ListPlot for showing the results of my numeric computation. I make my own ticks, so I never know before hand where the vertical center of my plot will be. ...
47 views

### Changing Wolfram command line output into copyable text

I generated a long polynomial using the Wolfram command line, with divisions and exponents. But the divisions look like this: 4 - 5 And the exponents are on a ...
58 views

### Developing easy code to apply Delta Method to generate prediction bands for custom distributions

I think that this is an interesting issue for all those who when to not only adjust one prediction function, but also to obtain the prediction bands to asses the graphical or tabular error I'm trying ...
65 views

### Piecewise Polynomial Interpolation

Given some data pairs $(x_i,y_i)$, with $i=0,...,m$, and a degree $r$, I wish to build a piecewise polynomial function to interpolate these data. That interpolation should be continuous, and, on every ...
64 views

### ColorFuntion input

Is there any input for ColorFunction, which ranges from Black for smallest values, goes through red-orange-yellow and ends in very bright yellow almost white for ...
65 views

### How do I solve for the real and complex parts of an equation simultaneously?

If I were to have an equation, say something similar to... (1-Sqrt[x - I y])/(1+Sqrt[x - I y]) = A + I B Where I = Sqrt[-1], is there a way for Mathematica to ...
137 views

### why Level does not sort output according to their levels

Consider this example: Level[a + f[x, y^n], {0, Infinity}] (*{a, x, y, n, y^n, f[x, y^n], a + f[x, y^n]}*) Why the output is sorted in this way. why not ...
52 views

### Inclusion-Exclusion Principle Implementation

I would like to know how I can write a Mathematica code for the Inclusion–exclusion principle. The formulas governing it are: \$ P(\bigcup_{i=1}^n A_i)=\sum_{k=1}^n (-1)^{k-1} ...
71 views

### Key->Value or Value when returning (multiple) parts of an Association

There seems to be an idiom whereby multiple parts generates Key->Value forms whereas for single part specifications, only a Value is returned. This however, can lead to inconsistencies as follows: ...
136 views

### Using ReplaceAll to replace a head

Why would this work to replace the head b with newHead: ...
111 views

### Learning Resources for Data Science in the Wolfram Language

I'm delivering an upcoming course on Data Science with the programming/analysis done predominantly in the Wolfram Language. I created the following table to leverage students' familiarity with Lists ...
50 views

### Why can NSolve only solve this system of equations after trivial substitution?

The first system immediately yields {}, but the second, equivalent, system yields the solution {{k -> 4.96048, tl1 -> 1.64842, tl2 -> 2.07466}} : ...