9
votes
1answer
128 views

Why are some functions available without having to load their parent package?

Functions such as GraphDistanceMatrix[] or AdjacencyMatrix[] are available without invoking ...
17
votes
1answer
1k views

Why are some function names red?

I need to evaluate Needs["GraphUtilities`"] before I can use functions such as GraphPath[]. When I do so, some functions get ...
16
votes
1answer
388 views

How to fix broken InterpolatingFunction?

I have an InterpolatingFunction based on irregularly-gridded data, like this: ...
16
votes
3answers
1k views

What is NDSolve`FEM`*?

I stumbled on this: ?"NDSolve`FEM`*" ...
10
votes
2answers
1k views

Using a function name instead of its definition in AxesLabel

I seek to use a token as an axis label, but this token, having other meanings, is expanded by Mathematica. If I enclose the token in quotes, it is not expanded, but it is also no longer italicized. ...
4
votes
1answer
102 views

How do you set an Optional parameter with a global variable on a Function defined in a Package

In a Package I am writing, I'm trying to define a function with an Optional parameter in it that is set to a global variable. ...
3
votes
2answers
220 views

Non-linear inequalities

I have five sets of inequalities and equations: $$A_1:=\{(b,c);b^2+9c^2-3c<0\},$$ $$A_2:=\{(b,c);\frac{\sqrt{b^2+9c^2-3c}-b+6c}{c}\leq0, \frac{-\sqrt{b^2+9c^2-3c}-b+6c}{c}\leq0\},$$ ...
8
votes
5answers
496 views

simplifying $\frac{\log x^a}{a} = \log x$

If one makes the assumptions $x>0,a>0$, then $\frac{1}{a}\log x^a = \log x$. Thus, in Mathematica, Simplify[1/a*Log[x^a], {a > 0, x > 0}] returns ...
7
votes
1answer
278 views

Changing the plot variable inside Plot [duplicate]

Possible Duplicate: Difference in Plot when using Evaluate vs when not using Evaluate Assume one has vector of functions (e.g., vec={x,x^2}). The ...
4
votes
1answer
481 views

How do I treat elements in a list as variables inside a module?

I want to be able to assign values to a list element inside a module. For example if I have: ...
2
votes
1answer
199 views

Checking if first derivative is zero at a given point

I have a function V[a_, h_, tau_] := (Sqrt[3]/2) h (Sqrt[3] a + h/3 tau)^2 now I want to check, whether its first derivative is zero in a given point. Say for ...
4
votes
2answers
460 views

ordering of functional eigenvalues

Is there any order to the symbolic eigenvalues of a matrix returned by the command Eigenvalues[...]? While numerical eigenvalues are listed in descending order ...
16
votes
4answers
1k views

Random data generator

Inspired by Quality of random numbers I would like to set up a true random data generator in Mathematica. My idea is to use the static from an open microphone. I recall reading about extracting the ...
23
votes
2answers
759 views

Block attributes of Equal

I answered “Equating matrices (or higher order tensors) element-wise” with: ...
2
votes
1answer
258 views

Integral not simplifying

I specify a function in terms of an integral and then try to evaluate it with Simplify. However, the answer is not really simplified to what it should be. ...
9
votes
4answers
268 views

Make a ragged list rectangular by trimming instead of padding

I have a ragged list ragged = {{a,b,c,d,e},{x,y,z}} that I would like to trim (on the right) to be rectangular. The desired result is ...
26
votes
3answers
803 views

Consistent Plot Styles across multiple MMA files and data sets

I am starting to write a thesis for which I want to use MMA for all my plotting needs, mostly because a lot of the basic analysis has been done there. To ensure that I am applying styles consistently ...
16
votes
2answers
3k views

How to save plots in grayscale

As sophomoric as this question seems, how should I save plots in grayscale in Mathematica? I generally like eps images for their scalability and I use ghostscript or other third party perl scripts ...
24
votes
3answers
3k views

Can Mathematica do symbolic linear algebra?

For instance, is there some way I can say "let A and B be arbitrary real $m\times n$ and $k\times m$ matrices, Simplify[Transpose[Transpose[A].Transpose[B]]]" and ...
4
votes
2answers
377 views

Close subgroup of cells and keep them closed

Styles can be used to give your calculation a book-like structure; with chapters, sections and paragraphs. Closing those subgroups of cells you don't want to see is then very powerful to create visual ...
11
votes
2answers
1k views

Simple algorithm to find cycles in edge list

I have the edge list of an undirected graph which consists of disjoint "cycles" only. Example: {{1, 2}, {2, 3}, {3, 4}, {4, 1}, {5, 6}, {6, 7}, {7, 5}} Each ...
6
votes
2answers
516 views

Saving in Latex

I have already asked this question in another topic, see here. When I save the following notebook code as $\LaTeX$, ...
13
votes
3answers
519 views

How to know if a number is the square of a rational?

I'm pretty new with Mathematica and I was looking for a way to know whether a number is a square of a rational. I thought of Head[Sqrt[myNumber]] == Rational ...
10
votes
1answer
387 views

Cluster analysis returns questionable results

A few weeks ago I ran a cluster analysis on some economic data and (unfortunately only) now I found out that some results do not make sense. For instance I analyzed the development of unemployment ...
12
votes
7answers
665 views

Equating matrices (or higher order tensors) element-wise

Say I have two matrices (or, as in my case, higher order tensors) $A,B$, and I want to solve the equation $A=B$. To do so , I need a list of equations that equate entry-wise the elements of $A$ and ...
5
votes
1answer
148 views

Impossible to bypass evaluation on returned values?

Following all the great advice on this other question, I'm now fluent with HoldAllComplete and Unevaluated on the input side of ...
2
votes
2answers
396 views

Cannot evaluate differential in Mathematica

I have a small toy script in Mathematica that I am trying to use to evaluate the pdf of $Y$ where $Y=X^2$, and $X$ is uniformly distributed in $[0,a]$. The script is, ...
10
votes
2answers
162 views

Subtle difference in conditional rules placement

I had gotten used to thinking of the placement of a condition in a rule definition as logically immaterial. In my specific example, namely ...
34
votes
3answers
1k views

Quality of random numbers

Mathematica has several ways of generating random numbers: Congruential, ExtendedCA, Legacy, MersenneTwister, MKL, ParallelGenerator, ParallelMersenneTwister, Rule30CA. For ...
17
votes
2answers
490 views

Obtain approximate Hessian using FindMinimum

According to the documentation, when FindMinimum is told to use the method "QuasiNewton" on a unconstrained problem, it uses the ...
8
votes
4answers
792 views

How to remove repeated permutations?

I want to get the Permutations on the elements of a list. Then I'm doing this: ...
3
votes
3answers
317 views

Retrieving PlotRange form BarChart

Consider the following data: data1={73.9377, 54.4122, 53.0826, 24.1936}; data2={76.828, 49.1673, 45.7883, 18.9015}; I defined my own BarChart as follows: ...
27
votes
4answers
2k views

Saner alternative to ContourPlot fill

I am producing a large number of ContourPlot objects, which when exported generate notoriously large PDF files because it basically generates lots of little ...
16
votes
2answers
463 views

Ad hoc graphics primitives-like objects

Sphere is one of the three-dimensional graphics primitives available in Mathematica and can be easily used to created very useful images. For instance, in the ...
9
votes
6answers
2k views

extract values from replacement list

Solve returns a list of replacement rules In: Solve[x + y == 3 && x - y == 6, {x, y}] Out: {{x -> 9/2, y -> -(3/2)}} I am only interested in the ...
15
votes
6answers
890 views

Using patterns in pure functions

Pure functions may be handy if you don't want to assign your function a name. For example I would calculate $x(x-1)$ for some numbers $x$ by ...
8
votes
1answer
415 views

CDF and personalized style

I recently created a custom stylesheet. I then created a notebook with the new style, confirmed that the notebook had adopted the style, and then saved a copy in CDF. But when I opened the CDF in ...
13
votes
4answers
688 views

Constructing a list that includes a leading zero (01,02,03 … 55, 56, etc.)

I am constructing a list for use in file operations. Say I want to create list which contains values from 01 to 87. The kicker is that the first nine integers need ...
5
votes
1answer
223 views

What changes in Dynamic have occurred from Mathematica 7 to Mathematica 8 that might induce incompatibilities?

I have a function that outputs a Manipulate (say FAnimated[params_]:= Manipulate[F[params,t], {Time, Animator[t]}] where F ...
6
votes
1answer
146 views

Efficient conditional division

I was curious about the following little problem. Suppose $n \in \mathbb{N}$ is some large number and $p$ is a (possibly large) prime, and I want to update $n$ according to $$n := \begin{cases} n/p, ...
3
votes
2answers
571 views

RegionPlot3D contour problem

I have a little problem and didn't succeed trying to solve it on my own. Situation is, I need a visualization of the function $s - 3\cdot s\cdot q + q$ as a region on p == 0 if function's value is ...
12
votes
1answer
2k views

What method does NDSolve use for solving PDEs?

What is NDSolve's mode of operation? I use it to solve partial differential equations and never gave it too much thought. Recently, I came across this question. ...
16
votes
2answers
735 views

Using a list of tuples in a pure function

I want to use a list of tuples within a function to make assignments. Say I want to make assignments of the form value[i,j] = val What I have is a list of ...
12
votes
5answers
2k views

How can you compute Itō Integrals with Mathematica?

How can you compute Itō Integrals with Mathematica? I tried searching through the documentations but I didn't find anything. P.S. I was not at all sure how to tag this question. I had to put in at ...
2
votes
1answer
178 views

Delete a style type from stylesheet

I have created a new stylesheet but now I'd like to delete a style type, for example "program" from it. How can I do it ?
9
votes
3answers
516 views

Ctrl+= opens the alpha input instead of below-script

When trying to type "traditional style" inputs such as integrals or sums, I follow the tutorial and type Esc sum Esc   Ctrl+= n=1  Ctrl+% 10 whatever However, when I type Ctrl+= it opens ...
12
votes
2answers
356 views

Wrong computation with N

I was trying to solve this problem using Mathematica 8.04. I did this: ...
17
votes
1answer
592 views

Funny behaviour when plotting a polynomial of high degree and large coefficients

I am trying to plot a polynomial of degree 29 on the domain [0,1], with fairly large coefficients: ...
8
votes
1answer
187 views

Pasting TemplateBox with a Dynamic argument

Ok, this is pretty specific... The objective is to use a TemplateBox to format something that is programatically inserted with ...
15
votes
7answers
6k views

Mathematica: finding min/max in list

I have a list of coordinates like this one: {{x1,y1},{x2,y2},{x3,y3},...,{xn,yn}} I need to get the minimum and the maximum of all x-values and the minimum and ...

15 30 50 per page