7
votes
2answers
1k views

How to discretize a nonlinear PDE fast?

I wish to numerically solve the following PDE. Although there are some complete discussions for solving PDEs in tutorial/NDSolvePDE, there is no hint for the nonlinear case by discretization. Thus, I ...
18
votes
11answers
886 views

Generating an ordered list of pairs of elements from ordered lists

I have a pair of ordered lists. I want to generate a new ordered list (using the same ordering) of length n by applying a binary operator to pairs of elements, one from each list, along with the index ...
1
vote
1answer
360 views

Why is Euler's number an uppercase “E” and not a lowercase “e”?

Why is Euler's number an uppercase "E" and not a lowercase "e"? Isn't Euler's Number normally expressed with a lowercase "e"?
2
votes
1answer
533 views

Equation of the plane passing through the three points [duplicate]

Possible Duplicate: How to put terms in lexicographic order? I write the equation of the plane passing through the three points $A(-1, 5, -2)$, $B(2, 4, -3)$ and $F(4, -8, 6)$, and this is ...
1
vote
1answer
204 views

Calling part of a variable in a user defined function

I have defined a function ...
28
votes
3answers
626 views

How to avoid nested With[]?

With[ {v1 = #}, With[ {v2 = f[v1]}, g[v1, v2] ] ] How to avoid nested With[] like the above? I'd like to use ...
7
votes
3answers
936 views

How to make a tight crop of a 3d plot?

I like Mathematica, but it's syntax baffles me. I am trying to figure out how to minimize the whitespace around a graphic. For example, ...
2
votes
2answers
636 views

export data points from differential equation system?

I am solving a dynamical three equation system. Besides plotting the individual effects for each of the state variables in an array and in a tridimensional graph, I would like to export the data ...
6
votes
2answers
149 views

Is Package development (via InitializationCells) compatible with creating new Notations (via MakeExpressions)?

Can new (lower-level) notations be readily used within package code? There are a few notational additions that might improve my code base but I'm not sure if these will end up being more trouble than ...
24
votes
1answer
742 views

Make a map of squares

I'm trying to use Mathematica to make a map similar to the one here i.e. a US map where each state is represented by a square of a given size, located as close as possible to its true geographical ...
18
votes
3answers
1k views

Improve Plot3D resolution near max/mins

I have the following function $$V(r) = \sum_{i=1}^N 4 \epsilon_i \left(\frac{\sigma_i^{12}}{\|r-r_{0i}\|^{12}}-\frac{\sigma_i^6}{\|r-r_{0i}\|^6}\right)$$ which -for those interested- corresponds to ...
4
votes
1answer
248 views

How can I avoid label collisions? [duplicate]

Possible Duplicate: How can I influence the spaces between labels on a BarChart How can I avoid label collisions in plot ticks and labels? For example, here is a histogram with colliding ...
0
votes
0answers
76 views

Making Mathematica graphics exported as PDF “usable” performance wise [duplicate]

Possible Duplicate: Exporting graphics to PDF - huge file Saner alternative to ContourPlot fill How can all those tiny polygons generated by RegionPlot be joined into a single FilledCurve? ...
1
vote
1answer
289 views

How to make a drop-down selector?

How to make a drop-down selector UI component? Something that looks like this
2
votes
1answer
193 views

Trying to plot ugly expression, not working

I have this ugly function : A[x_]:=((2 x^3 + 9 x^2 + 27 x + 3 Sqrt[3] (3 x^4 + 14 x^3 + 27 x^2)^(1/2))/2)^(1/3) (notice the fractional exponents at the end, it ...
2
votes
1answer
191 views

How can I change InputField value dynamically

I am storing the values from xlData to the result in a Grid form. I want when I change any of the value in any of the ...
3
votes
1answer
337 views

wrong use of _?NumberQ?

I am having trouble with a numerical exercise. Here's a simplified version of my problem. I define two functions to find the solution to two constrained maximization problems: ...
1
vote
1answer
141 views

Using an InputField to define a function to compose with a sequence

I am still trying to figure out Mathematica (started early August). I am trying to write a program that will accept an arbitrary function and an arbitrary sequence that can start at an arbitrary ...
5
votes
3answers
204 views

Scope within Context

To define some package-wide functions/variables, what approach is recommended? I tried to use contexts with the Begin function, but this failed: ...
1
vote
1answer
519 views

Is Mathematica matrix multiplication with its inverse wrong? [duplicate]

Possible Duplicate: Why don't * and ^ work as I expected on matrices? When I enter this ...
6
votes
3answers
352 views

Why don't I get numeric values from this Solve?

Solve[ a^2 + b^2 == c^2 && a < 100 && b < 100 && c < 100, {a, b, c}, Integers] gives me this result ...
15
votes
2answers
1k views

Fast Spherical Linear Interpolation of list of quaternions

An accurate way to interpolate between two quaternions is to use Spherical Linear Interpolation (Slerp) because it preserves the unit length, whereas straightforward linear interpolation does not, as ...
7
votes
2answers
294 views

How to write a UTF-8 file?

s = OpenWrite[ofile, CharacterEncoding -> "UTF8"] Export[s, "∂f/∂t"] Close[s] did not successfully write into the file. ...
1
vote
1answer
615 views

FindRoot inside Table

(MWE at the end of the post) I need to solve a non-linear equation $f(y;x_1,x_2,..,x_5)$ in one variable $y$ and then compute 4 new output expressions, for over 60 different initial parameter inputs ...
2
votes
1answer
123 views

Printing a success message if no errors have yet been thrown in the current session

I plan to run a lengthy Mathematica script on a Linux terminal (by "a Linux terminal," I mean that I have text output only -- no GUI), using the program math. To ...
1
vote
2answers
1k views

How do I find an equilateral triangle whose vertices have integer coordinates?

In geospace, how do I find coordinates of the vertices of an equilateral triangle whose vertices have integral coordinates? How do I tell Mathematica to do that?
4
votes
2answers
568 views

How can I solve the equation with integers as a solution?

I want to solve the equation $$(x-1)^2 + (y-1)^2 + (z-1)^2 = 49$$ where $x$, $y$, $z$ are integer and $x \neq 1$, $y \neq 1$, $x \neq 1$. How do I tell Mathematica to do that?
3
votes
1answer
160 views

Mathematica 8 and window names for modified files

I do not know if this is particular to Mac OS, but with version 8, the window name of a notebook no longer changes (with an appended *) when it is modified, as it used to do with version 7 (as well as ...
3
votes
1answer
156 views

How to link a button to a manipulate play

I am wondering how I can link a button to the play button shown if you expand "Show Animation Control", So something like, ...
8
votes
1answer
299 views

How to add a short wav music clip into a Mathematica animation

I have the following Mathematica animation: Animate[Plot[k*x^2, {x, -2, 2}, PlotRange -> {{-2, 2}, {-10, 10}}], {k, -2, 2, 0.1}] I also have a sound file ...
2
votes
1answer
451 views

FindRoot Infinite expression 1/0 encountered error

I have 1 equation in 1 variable, which when I use Plot, looks like this: ...
1
vote
2answers
430 views

How to Solve or LinearSolve $A = I$ matrix equation?

I'd like to solve this equation for $A = B$ where $B = I$, which represents 3 systems of 3 linear equations, for $a, b, c, d, e, f$, without writing LinearSolve 3 ...
0
votes
1answer
124 views
13
votes
3answers
926 views

Mathematica for linear algebra course?

I'm taking a linear algebra / matrix theory course and we are free to use any software we want, and will be "expected to use MATLAB or an equivalent" for homework. The professor and textbook (Applied ...
2
votes
1answer
197 views

Why is LogLogPlot[] slower than Plot[]?

I notice that LogLogPlot runs quite bit more slowly than ordinary Plot. For example, consider the following two blocks of code ...
3
votes
1answer
172 views

Labeled and Graph don't mix?

In an attempt to create a legend for a graph drawing, I find that Labeled only works without the position options (except for Center). ...
5
votes
3answers
238 views

First evaluation fails

I am fairly new to Mathematica (version 7), so please bear with me... I have duplicated, in Mathematica, a program that I originally wrote in C (it generates OEIS sequence A191837). The problem is ...
6
votes
2answers
1k views

How to check if a 3D point is in a planar polygon?

Following up on ndroock1's question, I naively tried to apply the solutions to a 3D point and polygon and they didn't work. For example, functions involving ArcTan ...
5
votes
1answer
228 views

How do I get the critical value in statistical hypothesis testing?

What I am trying to do is to get the value of $\chi^2$ for given probability (let us say $\alpha$=0.01) and degrees of freedom (for example df=3). How do I get that? Inverse...Distribution functions ...
17
votes
4answers
322 views

How to create Locator[] hierarchies?

I'd like to 'parent' Locators to one another, ideally organized in any arbitrary tree. The simplest case: If I have two Locators, A and B, then moving A will move both together, but moving B will ...
8
votes
3answers
713 views

Elegant manipulation of the variables list

I have a list of global variables (some of them are indexed variables), for example: varsH = Hold[U0[1], U0[2], B0, V0[1], V0[2]] Or (if it is easier to handle) ...
3
votes
1answer
340 views

Selecting polynomial roots and plotting against parameters

An implicit function $f(x,k)=0$ is quadratic in $x$ and contains one parameter $k$ which I must vary. Using Solve, I get two real solutions for each specific $k$: ...
11
votes
1answer
367 views

Microsoft SQL DatabaseLink connection using Windows Authentication

For those who use Mathematica with databases in companies, a common way to securely connect to those is using Windows Authentication (detailed here). Mathematica doesn't seem to support this ...
7
votes
2answers
206 views

Why does the name of a pattern affect the result of a transformation rule?

I was playing a little dirty, trying to get a template for defining a Curl[] operator. I wrote the following rule, which I knew was going to spit out a few ...
6
votes
2answers
352 views

How to properly handle mutual imports of multiple packages?

I'm new to the mathematica platform and I am developing a simulation framework as my first exercise and have been tearing my hair figuring how to make packages interact with each other. Ill explain a ...
11
votes
1answer
229 views

Evaluation indicator for a notebook

I have a GUI with a number of TabView and other Manipulate controls. Sometimes clicking from one Tabview to the other can take a while, and I would like to have a global "Please wait" indicator. So ...
4
votes
1answer
690 views

How do I use the ShowLegends function to produce a legend for my framed graphic?

I'm new to this site and new to Mathematica as you can see from my question. I'm also new to programming, btw. I'm trying to produce a legend for my plot which I've coded as follows: ...
5
votes
1answer
545 views

CustomTicks and ListPlot - Can't seem to get them working

I have a very large list of numbers like list={{a1,b1},{a2,b2},...,{ai,bi}} where a1 ranges between 10^-9 and 10^-5 and bi varies between 0 and 100. I have ...
1
vote
1answer
714 views

Problem while solving system of two second order non linear coupled differential equations using NDSolve function

I am a completely new to Mathematica, and I am sorry if this question is dumb. I have to solve a system of two second order non linear coupled differential equations (that I got from the Lagrangian ...

15 30 50 per page