6
votes
1answer
358 views

Filling only when one curve is below the other

I want to fill the area between two curves only when curve-1 (Black) is below curve-2(Blue). So In this example, I don't want the middle portion shaded but just the left and right tails to be shaded. ...
5
votes
3answers
578 views

Keep function range as a variable

Plot[2*x^2 - x + 2, {x, -1, 1}] plots a function of x from -1 to 1. As far as I can see, I cannot "save" this range in a variable: ...
9
votes
3answers
463 views

How do I get a two-term polynomial with a leading negative sign to display in the correct (i.e. textbook) order?

The first three expressions evaluate as expected and the polynomial is displayed in what I would call "textbook" form. The last expression, however, switches the order of terms. Mathematica employs ...
7
votes
3answers
356 views

Efficient way to utilise Parallel features to make use of many cores

Let's say I have 100 cores/kernels as my disposal and want to compute a function of two variables f[x,y] over {x,1,10}, ...
3
votes
1answer
88 views

Stop TradtionalForm evaluating expression

I'm trying to get this expression to display as typed instead of evaluating the 1/1.121. ...
0
votes
1answer
85 views

Formatting Equation Output Neatly

I looked around and couldn't find the answer to this anywhere, so I'm sorry if this is a bad question - I'm pretty new to mathematica. I wrote a program to help me compute some annoying series ...
1
vote
1answer
85 views

Calibrating Precision in calculations

As the title says, I encounter an irritating problem which has to do with the accuracy or the precision used in the calculations. To be more specific, I have the following code: ...
5
votes
1answer
525 views

Octonions in Mathematica

Is there a package or Notebook for Mathematica that can enable me to do some numerical calculations with octonions? Maybe a way to plug-in the octonion multiplication table?
4
votes
1answer
131 views

How to programatically save a notebook created by CreateDocument

I've already written code that generates about 20 notebooks using "CreateDocument" and I was wondering if there exists a method to automatically save them. Is there an easy way to create a notebook ...
4
votes
1answer
283 views

A Faster way to combine two Lists of different structures into one of a different structure [duplicate]

I have the following two lists (each containing over 500,000 elements). Here is a sample: ...
26
votes
5answers
958 views

Voronoi diagrams for generators other than points

Any suggestions how to determine Voronoi diagram for sites other than points, as e.g. in the picture below? Input is a raster image.
1
vote
1answer
323 views

Forcing evaluation of ArgMax

How to force evaluation of ArgMax before its output gets used in Solve? Background: I'm trying to solve for the Nash ...
0
votes
2answers
159 views

Why does ; suppress Dynamic output? [duplicate]

Dynamic[x=7]; does not make x dynamic! But Dynamic[x=7;] makes ...
16
votes
1answer
299 views

How does the built-in debugger decide what to highlight?

How does the built-in debugger decide which definition to highlight in the notebook when Break on messages" is enabled? Here's an example to illustrate what I mean. First, enable the debugger ...
8
votes
2answers
280 views

What is the value Re[Sqrt[1+I*2*x]]?

When I try to evaluate Re[Sqrt[z]], for some values of Mathematica fails to evaluate it. For example, Re[Sqrt[2 + I*x]]` ...
2
votes
1answer
220 views

Color coding based on 4D data within a building

I am trying to create something similar to a Heatmap within a building. Suppose I have a room with dimensions, {30,40,50} as length, width, and height respectively. I have a set of data that is of ...
0
votes
1answer
170 views

ContourPlot of a complicated function

I have the function $pot_1(x,y,z)$ which is given in analytical form. So, in order to plot the contours at the primary planes $(x,y)$, $(x,z)$ and $(y,z)$, I use the following ...
6
votes
1answer
264 views

Why does compiling a function with ConstantArray give an error when used in parallel?

Here is a sample compiled function: ...
2
votes
1answer
174 views

ConditionalEntropy and Statistics`Library`NConditionalEntropy

There is a function available from the Statistics`Library context called NConditionalEntropy that appears to compute ConditionalEntropy. Thus ... ...
2
votes
1answer
271 views

Solving an equation involving a determinant

I have a matrix which doesn't include numerical values. There are four variables in it. It is defined by ...
5
votes
3answers
737 views

Custom mesh in ListPlot3D

I have the following data: ...
4
votes
0answers
108 views

Proper treatment of roots and powers in Series?

I have the following problem in Mathematica 9 on Linux. I let Mathematica compute the Series expansion: ...
1
vote
1answer
279 views

How do I draw multiple 3D shapes defined by lists of points?

I'm attempting to draw $N$ cones on a 3D object, where each cone is specified by a pair of 3D coordinates. The first coordinate is for the cone's base, the second one for the cone's apex. Here, I ...
3
votes
1answer
431 views

NonlinearModelFit returning nonsense for very simple data

In fitting the following data, if I first log transform the y-values and use LinearModelFit I get a set of parameters that fits the data: ...
2
votes
1answer
253 views

Evaluate Numerator and Denominator Separately

I have this function. ...
6
votes
1answer
118 views

How can I keep a plot's filled area from obstructing other lines when exported as EPS?

I am plotting several functions, some of which have fillings. After I combine all the functions together on a plot and export the plot to an EPS file, the fillings obstruct other lines. Exported PDF ...
6
votes
1answer
77 views

Erfc Not Returning Results Specified in Documentation

In the documentation for Erfc (under "Possible Issues"), the following command returns a number that is extremely close to 2: However, when I run this same command in a fresh kernel, I get: ...
3
votes
1answer
550 views

Error message from evaluating NonlinearModelFit

I am trying to fit data to a Morse potential using NonlinearModelFit as follows: ...
-4
votes
4answers
1k views

Piecewise linear Interpolation between data points

Is there some sort of functionality built into Mathematica that will let me linearly interpolate between (x, y) pairs of data in an array? Example: I have the two points (1, 10) and (2, 20), how can ...
11
votes
2answers
435 views

Finding the perimeter, area and number of sides of a Voronoi cell

Does anyone have any suggestions how to determine the perimeter, area and number of sides of each Voronoi cell in Voronoi diagram?
3
votes
1answer
102 views

How does MakeBoxes handle an n-ary operator?

I want to format results from Reduce using the $\cup$ symbol instead of the $\lor$ symbol. For example, ...
-2
votes
1answer
1k views

Why can't Mathematica solve these non-linear equations? [closed]

$l_{2}$ and $\theta$ are the variables. All other parameters are constants. I need to find $l_{2}$ and $\theta$ in terms of these constants. $\frac{\mu_{0}\sin(\theta-\theta_{0})}{\sqrt{l_{2}^2 ...
0
votes
1answer
559 views

Contour plots of a two-variable function depicting the values of its integral

Given a two-variable function f[x,y], how to get the contour plots corresponding to several values of the integral of the original function. For example, I would ...
1
vote
0answers
143 views

Transferring a list from one notebook to another [duplicate]

I have Mathematica code split into two notebooks. The first part is supposed to run and output a list of numbers into a text file, using Export. The second part ...
6
votes
6answers
903 views

Image of first quadrant under $f(z)=(z+i)/(z-i)$

I'm able to plot the region where Im[z] > 0 and Re[z] > 0: ...
4
votes
1answer
506 views

How is the Mathematica kernel structured internally, and how does evaluation work?

There is so much information available for Java--the internal details of (for example) the JVM memory manager are well-documented, and the performance considerations arising from its interaction with ...
-1
votes
1answer
231 views

Plotting Extended Zone Scheme:

How could I present an extended zone scheme for a delta-function Kronig-Penney model? That is, how can I display only the lowest contour in the region [0, π], the second-lowest contour in the region ...
6
votes
3answers
191 views

How can text-specific antialiasing be disabled in Rasterize?

While tinkering with the code in the Falling Matrix question, I was hoping to improve the rendering speed by making the rasterizations of the text grayscale. I changed the base color of the text to ...
5
votes
1answer
191 views

How to find the name of the current function

I would like to know the name of the current function from within that function. For example, consider the following code ...
2
votes
1answer
290 views

How do I plot many arrows in a sphere?

I want to plot a lot of arrows in a sphere (3D-Plot). That is not a problem with a small number of Arrows; for a few I can do than something like this: ...
1
vote
0answers
88 views

Solving for vector elements in a function to which the vectors are not passed explicitly

I want to define a function which takes in two integers (indicating the lengths of 2 vectors), and solves a simple set of expressions at a set of points to find all the values in both the vectors. so ...
11
votes
2answers
379 views

Soft-Match String Comparison

I have a list of names in which I would like to check for duplicates. However, within the list, the duplicates may not show up as exact duplicates of each other - for instance, ...
0
votes
0answers
98 views

How do I get a plot with a certain size? [duplicate]

I am currently creating a poster for a conference in Scribus. I have a given space on the poster for a plot that I want to create with Mathematica. I don't want to scale in in Scribus, as this would ...
3
votes
1answer
101 views

Vertical “fractions” with more than 2 parts

Standard FractionBox syntax allows only 2 arguments and creates 2-part fraction for numerator and denominator. Is it possible to draw similar construction, but ...
8
votes
2answers
243 views

Strange behavior of PlotMarkers with ListLinePlot[] and InterpolationOrder->0

I want to create a ListLinePlot with InterpolationOrder->0. However, when using plot markers like in ...
1
vote
1answer
277 views

Read a file into a list of vectors [closed]

I have file structured as (Axis 1) (Axis 2) Data. As an example: ...
7
votes
1answer
385 views

Font size in PDF export with legended plots not working

I need to export plots as PDF with a given image and font size. Everything is working fine if there is no legend for that plot. However, if I want to export legended plots, the font size is decreased ...
4
votes
1answer
199 views

Can mathematica resolve this equation?

Obviously,the equation $x^2-3 y^2=2 z^2$ doesn't have positive integer solutions. I tried ...
14
votes
3answers
233 views

Is it possible to embed fonts in a .cdf?

I am trying to use a special font with musical symbols in a .cdf that I send to some friends. The font is called "Tempera" and is freely distributed here: ...
1
vote
3answers
159 views

Control maximum value of a slider with another control

Is it possible to make $y_{max}$ of Slider[y, {$y_{min}$,$y_{max}$}] depend on another control? For example, I have three variables (Time, Type1, Type2). I want a drop down box for the user to ...

15 30 50 per page