4
votes
2answers
287 views

How to speed up drawing a tangent plane?

I have this code to produce an interactive visualization of a tangent plane to a function: ...
8
votes
0answers
462 views

Does Mathematica use the Elliptic Curve Method (ECM) in FactorInteger[]?

I'm not a mathematician, and I'm not even going to pretend that I understand anything of the ECM. But I know it can be a fast method for factorization. I benchmarked the factorization of ...
5
votes
3answers
198 views

Map Input A B C to MyProduct[A,B,C] (NOT to Times[A,B,C])

In writing my own (noncommutative) product I want to avoid typing redundant symbols like A.B.C or A**B**C, I just want to type ...
2
votes
1answer
182 views

tricky memoization

Let's say I have the NDSolve example for documentation involving splitting 2nd order into set of 1st order ODEs: ...
7
votes
1answer
264 views

Are there any offline tutorials for Mathematica?

As can be seen from my questions, I am struggling to make Mathematica do something useful. The amount of tutorials on the Wolfram web site is a bit overwhelming, especially that I don't have too much ...
4
votes
2answers
2k views

How to find (numerical) value of a derivative at point?

I have the following function: f[0, 0] = 0 f[x_, y_] := Exp[-(x^2 + y^2)^(-1)] How do I find its partial derivatives at any given point, including $(0,0)$? This ...
6
votes
2answers
241 views

How to connect a checkbox with part of the graphics?

I'd like to have a checkbox in a Manipulate expression, governing whether part of the graphics is displayed or not. For instance, assume that I have a surface with ...
4
votes
2answers
340 views

PDF exports of ArrayPlot's are fuzzy (OS X)

[The following problem occurs on OS X; I don't know if it also occurs with other OS's.] If I produce a Graphics object with ...
7
votes
3answers
326 views

how to read in a file in the same directory?

Now I am writing a small package. I have written several files and put them in the same directory. And some files need to read in or include another file in the same directory. But when I simply write ...
6
votes
3answers
225 views

Importing and manipulating strings - time data

I have a list of time durations, which are strings of the form: "hh:mm:ss". Here's a sample for you to play with: ...
0
votes
1answer
203 views

How to repeat a plot with different options

I'd like to have first a function plot and then the same plot repeated inside a Manipulate, with additional things (like tangent planes etc.). I can do ...
6
votes
1answer
254 views

How to compile Map and MapAt

I have a long list (say, million of elements, like this one: {{{1.0, 2.0}, 3}, {{4.0, 5.0}, 6},...} I would like to compile a function ...
23
votes
4answers
959 views

Are there suitable versioning systems for Mathematica notebooks?

I am considering a project using Mathematica and openCL. I know that the openCL C source code can be tracked. Has anyone used a versioning site or software so multiple developers can modify a common ...
4
votes
1answer
152 views

Transform sequential cell operations to programmatic workflow

Let's say I have a workflow that involves importing images and turning them into an animated gif. Here's how I currently have it setup: Import Images: ...
7
votes
4answers
726 views

How to combine ArrayPlots?

Define: fat = ArrayPlot[RandomReal[1, {20, 10}], ColorFunction->"Rainbow"]; skinny = ArrayPlot[RandomReal[1, {20, 1}], ColorFunction->"Rainbow"]; What ...
7
votes
1answer
94 views

$CurrentLink passing down in MathLink SetDelayed functions

I would like to utilize the MathLink option of having each Install of my package result in a linking object which I can use to control when and how certain elements ...
8
votes
3answers
204 views

Identify which cell uses most memory in front-end

Even though the mathematica front-end is much more robust than it used to be, everyone must have noticed that when a few 3D graphics are involved, the front-end produces very large notebooks which ...
4
votes
0answers
126 views

Creating a PolyhedronData[] structure for custom polyhedra [duplicate]

The PolyhedronData[] structure is wonderfully rich. I would like to create data for my own polyhedra, not any of the many that Mathematica provides. Is this ...
3
votes
1answer
383 views

Efficient way to perform elementary integration step with NDSolve internal method

I'm trying to tweak the NDSolve function to perform one elementary integration step (using some explicitly selected stepping algorithm via ...
11
votes
2answers
875 views

How do I compute sidereal time and JD?

There was once a package that provided a wide range of functions for computing astronomical information. This package now appears to be out of date; but as near as I can tell, many of the useful ...
1
vote
1answer
1k views

Plot cubic root which includes the negative graph [duplicate]

Possible Duplicate: Finding real roots of negative numbers (for example, $\sqrt\[3\]{-8}$) Yes, I know there are other Threads which have similar questions and yes I read them but I am just ...
3
votes
1answer
389 views

Control over depth-first scan and breadth-first scan

Is there a way to conditionally take control/modify the flow during a depth-first scan or the breadth-first scan ? Say, for example, if a particular node if found, consider it as a leaf-node and ...
1
vote
2answers
173 views

Scalar product of two vectors have the least value

In geometry 3D, let $A(1,2,-3) $ and $B(-1,4,1)$ are two points. In the plane $(P):2x-3y+3z-17=0$, find a point $M$ such that the scalar product of two vectors $AM$ and $BM$ will have the least value. ...
5
votes
1answer
207 views

How to convert String to an Expression inside Manipulate which depends on control variable

Normally, in Global context, these 2 are equivalent eqn = "r-x"; r = -2; Plot[ToExpression[eqn], {x, -5, 5}] and ...
8
votes
1answer
241 views

Elementwise, compilable min function

I am trying to implement efficiently a transfer-matrix like algorithm. On each iteration, I have two vectors $x=\{x_1,\dots,x_n\}$, $y=\{y_1,\dots,y_n\}$ with real numbers and I need to compute the ...
2
votes
1answer
380 views

How to solve simultaneous equations faster with Compile?

I have large 6x6 matrix Uwhich is a multiplication of 15 rotational matrix. All of the elements are Sin\[theta] and ...
5
votes
1answer
174 views

Control variable and body variable decoupling in Manipulate

This issue was raised as an offside problem in this thread. Consider the following example, that does not work as expected: ...
0
votes
2answers
171 views

Sum of roots of a trigonometric equation

The equation $$ \sin x + \sqrt{3} \cos x = 1,$$ where $x \in [-2\pi, 2\pi]$ has four roots $-\dfrac{3\pi}{2}$, $\dfrac{\pi}{2}$, $\dfrac{\pi}{2}$ and $\dfrac{11\pi}{6}$. Sum of roots of the given ...
2
votes
2answers
451 views

Dynamically choosing which Manipulate controls to use

I have some stuff I would like to manipulate, using two different kinds of control, one at a time, using another variable as a switch. These controls are similar in principle to ...
4
votes
3answers
496 views

Place graph vertex labels in circles

Consider the following code: ...
8
votes
1answer
207 views

Determine page count programmatically [duplicate]

Possible Duplicate: Generating a table of contents By selecting File > Printing Settings > Headers and Footers from the menu, I am able to enter << Total Pages >> to print the total ...
10
votes
1answer
536 views

Is my expression too complicated for FullSimplify or am I doing something wrong?

I have a messily defined function $v(h, w)$ with $h, w \in \mathbb{R}$ and with a removable singularity at $h=1/2$, and I am trying to prove some of its properties using Mathematica. In particular I ...
4
votes
1answer
554 views

How can I get Mathematica to allow me to apply FindRoot to an expression that contains NIntegrate?

I am trying to run the following command in Mathematica: FindRoot[NIntegrate[D[f[x], x] / Sqrt[1 - x^2], {x, 0, 1}] - d, {a, 245}] As you might expect, a is ...
21
votes
2answers
596 views

How do I efficiently navigate the command line interface to Mathematica?

I would like to perfom such feats as cycling through previous commands, editing commands in place, etc. My expectation would be a readline-like interface, but this appears to not be the default.
1
vote
1answer
2k views

Why doesn't this plot work? [closed]

I'm trying to plot the output of an integral, but the plot does not show. The axes show, but not the plot itself. I have tried what I felt was a reasonable range of axes values, but the result is the ...
5
votes
1answer
659 views

Polynomial Approximation from Chebyshev coefficients

I would like to expand a function $f(r)$ in the domain $[0,R]$, around the points $r =0$, and $r = R$ in the following manner $f(r = 0) = \Sigma_{i=0,i = even}^{imax} f_i (r/R)^i$ and $f(r = R) = ...
1
vote
3answers
349 views

equation solving problems

I have some equation: $$ veq=-2-lr-l^2r+2(r+ir^3\omega) v' + (-2+r)r^2v'^2 + (-2+r) r^2 v''==0 $$ or in Mathematica form: ...
17
votes
4answers
517 views

How do I introduce a new variable in a trigonometric equation?

I have the trigonometric equation \begin{equation*} \sin^8 x + 2\cos^8 x -\dfrac{1}{2}\cos^2 2x + 4\sin^2 x= 0. \end{equation*} By putting $t = \cos 2x$, I have \begin{equation*} \dfrac{3}{16} t^4+ ...
2
votes
2answers
146 views

Constraining a random function

This question is a follow-up from here. I have a function that generates a list of correlations between some random variables: ...
9
votes
1answer
630 views

Functional programming and Do loops

I'm writing a Monte Carlo simulation. I'm using a Do loop to create the different simulations, iterating over different ...
6
votes
2answers
372 views

Reduce and Solve unable to solve equation

I have the following equation. Why aren't Solve and Reduce able to find the solution? ...
2
votes
1answer
646 views

Solving a PDE containing DiracDelta

I want to get the answer from a PDE: $$\begin{align*} \frac{\partial \rho(r,t)}{\partial t}&=Dr^{-2}\frac{\partial}{\partial r}r^2h(r)e^{-U(r)}\frac{\partial}{\partial ...
3
votes
1answer
1k views

Nested If statements

When I do this: Apply[(If[#2 == what, "yay", If[#2 == whoops, "nay"]]) &, {-5, what}] I get: yay But when I do this: ...
7
votes
1answer
191 views

Prevent interdependence of controls

My question is probably best illustrated with this small sample code: ...
0
votes
1answer
57 views

What is the most elegant way to see if an expression is affected by a certain symbol? [duplicate]

Possible Duplicate: Determine whether some expression contains a given symbol Let's say I have some expression: sample = {1, 1/q, f[m]} And I want to ...
16
votes
3answers
967 views

False Color SEM image with Mathematica

I have a question regarding colouring and binary image filtering, but unfortunately, the system doesn't permit the inclusion of images for first-timers. If anyone would like to see the images ...
19
votes
4answers
542 views

How can a big table be treated as a database?

I often work with big tables that I want to treat kind of like a database. Here's an example table. ...
12
votes
1answer
233 views

Is it possible to Clear all variables (but not functions)?

I have written a Mathematica script in which I define functions and variables. Here is a vastly simplified example: ...

15 30 50 per page