5
votes
2answers
189 views

Why rule does not work if Flat attribute?

The following works: ...
0
votes
1answer
145 views

Apply rule only if applicable? Check rule applicability? Custom unapplicable rule?

How to avoid recursion in the following example? ...
1
vote
1answer
341 views

Why does the mean in my coin tossing simulation not approach 1/2?

I simulate a simple experiment, a coin flip. What I do is accumulate the mean of the results up to the i-th experiment. What I can't figure out is why the computed means do not asymptotically approach ...
2
votes
1answer
210 views

Convert boolean test function to pattern?

What is a "reverse" to MatchQ? MatchQ converts pattern into boolean function. So how to convert back? Suppose I want to use ...
7
votes
1answer
161 views

Custom attributes?

Is it possible to assign custom attributes to symbols and check them later? SetAttributes[a, b] says ...
1
vote
1answer
337 views

Complex Region using Presentations Package

Just purchased the Presentations package. First sketched this region: ...
3
votes
2answers
210 views

FindShortestPath with negative weights isn't working

I have the following functions defined: ...
7
votes
1answer
144 views

Restrict access to Lightweight Grid

When using the default configuration of the Lightweight Grid Manager, anyone connected to the same internal network where the grid severs are can launch kernels on the grid. What possibilities are ...
2
votes
1answer
447 views

How can I solve an exponential inequality in Mathematica?

I would like to solve the equation: A Exp[m t + s Sqrt[t] x - 1/2 s^2 t] >= K with respect to x (which is in the exponent) ...
2
votes
2answers
171 views

Programmatically writing to a notebook in TraditionalForm

I'm trying to get a Cell to appear in TraditionalForm when using NotebookWrite. Here is the closest I can get: ...
0
votes
0answers
39 views

How do I replace a variable with the answer from a solve function in the form k-> number + variables? [duplicate]

Possible Duplicate: Using the result of Solve in subsequent calculations extract values from replacement list I am trying to define a variable (k1) as ...
16
votes
3answers
756 views

How to get the real PlotRange using AbsoluteOptions?

The problem in general involves the unreliable behaviour of AbsoluteOptions when option values are implicitly specified (e.g. ...
3
votes
1answer
587 views

Is the source code available for examples in the “Mathematica Cookbook” by Sal Mangano?

I looked around a bit and didn't seem to find it. Not as obvious as Wrox books make it, for example. I came across a pdf of the book online [I paid for the paperback] but pasting the code from the ...
4
votes
1answer
227 views
3
votes
1answer
311 views

How to plot a log log plot of the error

Suppose I have a function $$ f(x) = \frac{1}{1+e^x}$$ I can use the function Series[] to generate a series expansion of $f$ as follows ...
3
votes
1answer
705 views

Value of $BaseDirectory within Ant script?

I'm using an ant script to install my application from the Workbench (as suggested in this answer). In past I've used two ways of specifying the destination for the build: Hard-coded directory, like ...
6
votes
1answer
398 views

Accessing data on local machine from remote kernel

I have a remote kernel on a server that I would like to use to process some data. The connection works, i.e, I'm able to use the local front end and the remote kernel. However, I cannot figure out how ...
4
votes
1answer
2k views

Using Physical Constants in V9

How is one supposed to work with physical constants in Mathematica V9? When I first open Mathematica, physical constants such as SpeedOfLight are not recognized. If ...
2
votes
3answers
255 views

Making data persistent, as in xmgrace

I've been using xmgrace for quite a long time as my favorite solution for scientific data manipulation and plotting. These data often come from home-made fortran programs, in the form of, e.g., a ...
5
votes
1answer
379 views

Label area on plot

I created the following plot using Mathematica: ...
2
votes
1answer
109 views
6
votes
1answer
159 views

FunctionTreeForm

I'd like to implement a function FunctionTreeForm which takes an arbitrary complex function and renders all the captionable subfunctions in a TreeForm. Explanation If we take e.g. a function: ...
2
votes
2answers
812 views

Global variable initialization in packages

Is it a good idea to Initialize variables globally inside a package ? will they be local by default to that package ?
2
votes
1answer
207 views

Computing derivatives of a moment generating function

Dear Mathematica users, I'm trying to compute higher order derivatives of a moment generating function and then evalutate them in 0 (in order to get some moment conditions for a GMM estimation). ...
8
votes
1answer
757 views

Using a compiled function inside NIntegrate gives “CompiledFunction::cfsa” message

The following function is defined for Real input: FFc = Compile[{{x, _Real}, {EF, _Real}},If[x > EF, 0., If[x == EF, 0.5, 1.]]] FFc is now used in the ...
5
votes
3answers
233 views

How could I implement the equivalent of NextPrime

I would like to know what an implementation of the function NextPrime would look like if it were implemented in Mathematica's core language.
-4
votes
2answers
525 views

How can I draw a picture like this? [closed]

How can I draw a picture like the following using Mathematica's graphics primitives?
3
votes
2answers
320 views

Deleting Print results

While playing around with $Pre and $Post I created this very annoying piece of code: ...
2
votes
1answer
158 views

Representation of product with exclusions

Is there a nice way to define output formatting for my expression, a product from n = k to j with ...
-1
votes
3answers
190 views

How to systematically classify Mathematica expressions?

How to systematically classify Mathematica expressions? I can think of using Head[], Depth[], ...
2
votes
2answers
270 views

Misaligned DensityHistogram, DistributionAxes & PlotRange

data = RandomReal[NormalDistribution[0.5, 0.1], {10000, 2}]; DensityHistogram[data, PlotRange -> 1, Method -> {"DistributionAxes" -> "Histogram"}] The ...
5
votes
2answers
153 views

CompiledFunction crashes kernel

This crashes my kernel ...
10
votes
1answer
1k views

How to work around Mathematica hanging when showing a large SparseArray?

Note: This is fixed in 9.0.1. In Mathematica 9, if I display any large SparseArray object in the default way (which looks something like ...
7
votes
2answers
2k views

How to study asymptotic behavior, built-in functions

My question is as follows. Suppose we have a function $f(r)$ and we want to study its asymptotic behavior at infinity ($r\rightarrow \infty$). For example, the function may reduce to $-\frac{a}{r}$ or ...
1
vote
1answer
161 views

Spacer and Text in Graphics going Awry (in Mathematica 7)

Use of a vertical Spacer in justified text inside a graphic isn't working as required. The result in the green box looks right, but when this is placed in a ...
8
votes
5answers
570 views

How to save Manipulate bookmarks permanently?

I would like to save current Manipulate parameter values to load them again later. Bookmarks (previously discussed here and here) work fine until the cell is ...
3
votes
1answer
861 views

How to save a GraphicsRow output?

I need to save the result of GraphicsRow command as a pdf or jpg file. Something like GraphicsRow[{plt1,plt2,plt3}] -> pdf. On clicking on the image there is ...
2
votes
1answer
441 views

How to colorize a rectangle with a given color function?

I want to set color to a rectangle (in fact a line) that lies on (0,0) and (1,0), and the color function is given by $u(x,t)=t(x-x^2), 0\leq t\leq1$. Since, this $u(x,t)$ act as temperature at the ...
1
vote
1answer
275 views
-1
votes
1answer
157 views

Manipulate code creates error messages when file is opened

When I open the file containing the following code I get a series of error messages. Once I evaluate the cell with the code the error messages disappear. What is Mathematica doing when it opens a ...
5
votes
2answers
374 views

Generating stripes on a polygon

I want to create a Graphics3D polygon that has stripes on it. My code is ...
2
votes
0answers
663 views

ParametricNDSolveValue or NDSolve + fitting

I have been trying to find the value for the parameter kestim that yields the best fit of a model to some data points. datac has ...
4
votes
1answer
119 views

Why can't an `Import[]` change $Path?

Does anyone know why Import["http://**server**/file.m"] can't make a change to $Path? It seems like ...
11
votes
1answer
911 views

How to specify default style in Mathematica 9

In Mathematica 8, I can use GraphicsBoxOptions->{DefaultBaseStyle->{"Graphics", FontFamily -> "Helvetica", FontSize -> 14}} to specify the default font ...
2
votes
1answer
169 views

How can I get Mathematica to simplify my expression?

4.`*^-12 Sqrt[3.0254210421890627`*^22 - 6.25`*^22 T6^2] The above expression is equal to Sqrt[0.48406736675024997` - T6^2] ...
0
votes
1answer
126 views

Images in package Not visible

I want to make a package where some variables are initialized to images. but when i save the package, all images are in the form of ImageData that are very long. ...
29
votes
2answers
634 views

Why does Simplify ignore an assumption?

Here is the example: Simplify[x + y, x + y == a] Simplify[x + y, x + y == 5] Mathematica 9 output: x+y 5 I expect the ...
2
votes
1answer
164 views

Why are the elements of plots separated in exported PDFs?

When I export a plot to a PDF with something like Export["test.pdf", Plot[Sin[x], {x, 0, 2 Pi}], "PDF"] I get a file in which the axes have been separated from ...
4
votes
2answers
222 views

How can I get Mathematica to include size information in exported SVG?

When I use Export to export graphics in SVG format, the exported file contains no width ...
8
votes
2answers
180 views

For any symbol, how can I get the full context-qualified name of the symbol as a string?

I'd like to have a function, whether built-in or not, that when given a symbol, whether bound to a value or not, returns a string giving the context and name of the symbol. Example: ...

15 30 50 per page