All Questions

3
votes
1answer
88 views

Graphics[] not working from within For[]

Why is the following code not plotting the set of points from {1,1} to {10,10} ? For[i = 1, i <= 10, i++, Graphics[Point[{i, i}]]]
11
votes
1answer
1k views

Fitting a spline to data with FindFit?

I am trying to find a function that fits my almost linear data. A high order polynomial model has too much residual. So I was hoping to use Mathematica to fit splines to the curve. This is what I ...
13
votes
2answers
516 views

Single-Window-UI not possible?

I'm still very frustrated about the separation of the menubar (File, Edit, Insert, ...) and the open notebooks in different windows. I would prefer to have the menubar directly above each notebook in ...
10
votes
2answers
1k views

How to plot empty rectangle?

I know there is a Rectangle[] function, but it is always filled with some color. What I need is a rectangle, which is empty inside (only it's boundaries visible). I ...
7
votes
2answers
1k views

How to tell Mathematica that a function is dependent on other variables?

I am trying to derive some turbulence model dependencies and I am using Reynolds averaged Navier-Stokes equations. What I am trying to do is to tell Mathematica that OverBar[u] is dependent on x,y,z ...
3
votes
1answer
123 views

Directing output of PrintTemporary to an additional OutputStream

I want to log messages that I send to the screen, even temporary ones. By setting $Output appropriately, it is possible to log ...
9
votes
2answers
2k 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
1k 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
395 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
776 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
220 views

Calling part of a variable in a user defined function

I have defined a function ...
35
votes
4answers
841 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
1k 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
928 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
162 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 ...
27
votes
1answer
865 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 ...
19
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
264 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
84 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
451 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
217 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
214 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
441 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
158 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 ...
6
votes
3answers
242 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
583 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
390 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 ...
8
votes
2answers
376 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
752 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
147 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
2k 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
837 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
162 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
205 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, ...
9
votes
1answer
356 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
552 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
568 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
131 views
14
votes
3answers
1k 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
210 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
185 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
247 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 ...
7
votes
3answers
2k 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
297 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 ...
18
votes
4answers
334 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 ...
11
votes
3answers
991 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
461 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
431 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 ...

15 30 50 per page