1
vote
2answers
181 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
232 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
294 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
425 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
201 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
178 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
564 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
622 views

Place graph vertex labels in circles

Consider the following code: ...
8
votes
1answer
243 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
614 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 ...
5
votes
1answer
700 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 ...
22
votes
2answers
708 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.
5
votes
1answer
866 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
362 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
542 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
170 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
694 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
421 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
705 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
2k 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
197 views

Prevent interdependence of controls

My question is probably best illustrated with this small sample code: ...
0
votes
1answer
59 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
1k 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 ...
20
votes
4answers
569 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
263 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: ...
20
votes
2answers
1k views

How to quickly calculate intersections of filled curves?

I am trying to quickly calculate the intersection of polygons with more than 6,000 points. A compiled solution would be preferable. Here is one example of the problem: ...
5
votes
0answers
119 views

Package for voting systems

Is there a mathematica package that implements common voting systems (like IRV where voters will rank the candidates)?
3
votes
2answers
325 views

Rules governing Plot line generation

I was looking at the Documentation Center for Round, Ceiling and Floor when I noticed that ...
6
votes
3answers
889 views

Determine if solution to linear system exists

I'm trying to determine only if a solution to a linear system of equations exists. I have been using LinearSolve, which works fine, but it solves the system as ...
3
votes
0answers
210 views

Accessing MathematicaScript over ssh/network

Here is the conundrum I am faced with. I have two computer. One with Mathematica (and hence MathematicaScript) but generally poor resources. The other without ...
5
votes
1answer
232 views

Timing differences between multiple executions of identical code

I have a list of pairs of numbers and I'd like to change the sign of the second element in each pair i.e. $(a,b)\rightarrow (a,-b)$. I'm sure there are many ...
0
votes
1answer
112 views

Importing RSS to Notebook: How to get images instead of long ugly links?

This question on importing news headlines via a RSS feed reminded me of an old question I've been meaning to ask. Past attempts at finding a use for Mathematica's RSS to Notebook capabilities were ...
5
votes
2answers
380 views

Merging (combining) tables of graph relationships (2-mode to 1-mode network)

I have some data of corporate board members in Australia in excel format here (Dropbox public link). It is the data behind this graph. The first worksheet is of all the vertexes (directors and ...
3
votes
1answer
173 views

Change values in equation with slider

I want to make an equation where the values adjust to my slider which I inserted with manipulate. Well, I tried, but when I use the slider the equation starts to fall apart. Actually this should ...
19
votes
5answers
697 views

How to visualize the voting choices in the moderator elections?

I'm trying to use Mathematica to create some visual representations of the votes cast in the recent Mathematica-StackExchange moderator elections. (Not the vote-counting system itself, OpenSTV, but ...
12
votes
1answer
182 views

Unable to evaluate reasonable max expression

Consider the following statement: Max[0, Sqrt[1 - Cos[4 \[Theta]]]] You'll find that Mathematica won't evaluate this, because it doesn't know the range of ...
12
votes
1answer
197 views

Layout a second graph of the same nodes in the same way

I have a number of graphs with the same nodes. I would like to be able to somehow save the layout that results from the spring embedded results of one graph (the first image), and have the other ...
3
votes
2answers
251 views

Plotting a floor function with endpoints?

Would someone mind showing me how to plot a floor function with the appropriate endpoints? I tried Google, but the best I could find was something posted from 2004 that no longer appears to work. ...
0
votes
1answer
159 views

How to add FindDivisions to the plot commands?

I used these instructions to make a legend bar next to my plot (I can't comment there) But I'm lost to where and how can I add FindDivisions to the DensityPlot under "Edit: illustrating additional ...
7
votes
1answer
342 views

Control parameters of different styles of DistributionChart

Using DistributionChart, you can choose among several styles aka ChartElementFunction: ...
2
votes
3answers
380 views

Exporting to quicktime in linux version?

In MMA (8.0.0/Linux), I tried to to create an animation using the command Export["s4s5mov.mov", listOfFigures] and got the output Doing a little research, one ...
8
votes
2answers
2k views

Convert a string to hex number?

How can I convert a string containing a hex number such as "6b" to a hex digit that mathematica can use to do math with? I have tried using ...
0
votes
1answer
462 views

Solving Differential Equation depending on variables solved by NDSolve

How to solve a differential equation which consists of variables depending upon another differential equation?
2
votes
1answer
136 views

Using MaxStepFraction as ticks on plot

Is there any way I could use the MaxStepFraction (or grid size) as used in NDSolve in the example below as ticks on the 3d Plot? ...
2
votes
2answers
315 views

How to get dynamic results of the values in three InputFields

I have three InputField-s which have no initial value. I would like all InputFields to have a value in descending order and for ...
3
votes
1answer
1k views

Creating a random normal matrix

I would like to create a random matrix with the constraint that the matrix must be normal, i.e. the matrix and its Hermitian conjugate must commute. I would create a random matrix "without ...
10
votes
3answers
451 views

Toggle visibility of elements in a plot

I have three simple graphs in one Plot. Now I am trying to make a button for each graph so you can hide or show it in the plot. Until now I was just able to make a checkbox with the Manipulate ...
4
votes
2answers
869 views

Why is my animation so slow?

I have an animated plot of the kind ...
4
votes
1answer
166 views

How to recover a graph without instructions to produce it?

I have an output graph on a saved notebook that I cannot reproduce with my data (I messed up the instructions). Can I take that graph, insert it in a new notebook and modify it? (I'm thinking about ...

15 30 50 per page