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
263 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
270 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
736 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
430 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
250 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
547 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
433 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
289 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
276 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 ...
6
votes
1answer
127 views

How do you force line spacing to be uniform when a line contains characters with vector or overdot?

A persistent problem I've run into is that certain character decorations within the text of a paragraph will often add extra line spacing even if there is already plenty of space between lines. This ...
6
votes
0answers
136 views

In .NET/Link, how do I not open multiple kernels?

I'm writing an ASP.NET page intended for multiple users. On the backend we have datatypes that are primarily mathematical, and interact with Mathematica for string-to-double evaluations, among ...
3
votes
1answer
139 views

How can I get a single solution to a set of inequality constraints?

I have a set of constraints to which I require integer solutions. However, instead of needing all possible integer solutions (as obtained by using ...
13
votes
1answer
283 views

High memory use while exporting a BMP

Something mysterious is going on when exporting images. I'm using Mathematica 9.0.1 on Windows 7 (64 bit), and find that the memory use is excessive when exporting to a bmp. But it doesn't happen ...
1
vote
2answers
154 views

Construct a sum that evaluates its arguments but doesn't evaluate further

I'm trying to construct a sum like this: Sum[body, range] where body is ...
7
votes
3answers
178 views

Wrapper for inexact numeric complex numbers that maintains polar form

Related question: How can I convert a complex number a+b I to the exponent form A Exp(I phi)? Mathematica insists on displaying complex number in form a+I b when ...
6
votes
4answers
430 views

How do I display an expression with negative powers?

How do I display an expression with negative powers? Mathematica seems to always invert a term with a negative rational power. None of the following work: ...
9
votes
4answers
1k views

Plot a 2D vector path onto a surface

In my calculus 3 course, we're studying gradients and have a project that takes a combination of 3D Gaussian radial surfaces and a basic parametric path $r(t) = \{x(t),y(t)\}$ to see how the gradient ...
3
votes
0answers
323 views

A is fast, B is fast, but together they're Mathematica-crashing slow?

I'm trying to do something with finding solutions to a quantum mechanics problem with n wells. If there are 40 wells, I need to find the solution to an equation in the form: ...
3
votes
2answers
470 views

All possible solutions to the Matrix Equation (free variables appearing)

I am attempting to solve a system of linear equations using LinearSolve[] . In my case, the number of unknowns are more than constraints. I learnt that LinearSolve ...
27
votes
2answers
1k views

Playing with Matrix falling code in Mathematica

I was trying to create a Matrix falling code image with Mathematica. Here is my code: ...
11
votes
2answers
516 views

Efficient GeometricBrownianMotionProcess Monte Carlo simulation

Following the answers in this post, I'm trying to implement something similar. If the GBM stays inside the corridor [L, U] between predefined times it should return ...
1
vote
1answer
262 views

Speeding up code by avoiding repeated evaluation of a function

I want to speed up my code and I have two ideas, but I don't know how I can implement them. Here is a little part of my code, which I want to improve: ...
6
votes
2answers
252 views

How to get the matrix coefficient from a QuadraticForm expression in a very fast way?

As we know, QuadraticFormDistribution is the distribution of z.a.z + b.z + c for a real-valued p x p symmetric positive definite ...

15 30 50 per page