# All Questions

128 views

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

Functions such as GraphDistanceMatrix[] or AdjacencyMatrix[] are available without invoking ...
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 ...
388 views

### How to fix broken InterpolatingFunction?

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

### What is NDSolveFEM*?

I stumbled on this: ?"NDSolveFEM`*" ...
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. ...
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. ...
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\},$$ ...
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 ...
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 ...
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: ...
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 ...
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 ...
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 ...
759 views

### Block attributes of Equal

I answered “Equating matrices (or higher order tensors) element-wise” with: ...
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. ...
268 views

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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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$, ...
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 ...
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 ...
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 ...
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 ...
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, ...
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 ...
1k views

### Quality of random numbers

Mathematica has several ways of generating random numbers: Congruential, ExtendedCA, Legacy, MersenneTwister, MKL, ParallelGenerator, ParallelMersenneTwister, Rule30CA. For ...
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 ...
792 views

### How to remove repeated permutations?

I want to get the Permutations on the elements of a list. Then I'm doing this: ...
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: ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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, ...
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 ...
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. ...
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 ...
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 ...
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 ?
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 ...
356 views

### Wrong computation with N

I was trying to solve this problem using Mathematica 8.04. I did this: ...
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: ...