# All Questions

265 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 ...
387 views

### Label area on plot

I created the following plot using Mathematica: ...
111 views

...
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: ...
853 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 ?
212 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). ...
802 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 ...
235 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.
547 views

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

How can I draw a picture like the following using Mathematica's graphics primitives?
348 views

### Deleting Print results

While playing around with $Pre and$Post I created this very annoying piece of code: ...
161 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 ...
191 views

### How to systematically classify Mathematica expressions?

How to systematically classify Mathematica expressions? I can think of using Head[], Depth[], ...
279 views

### Misaligned DensityHistogram, DistributionAxes & PlotRange

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

### CompiledFunction crashes kernel

This crashes my kernel ...
2k 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 ...
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 ...
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 ...
588 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 ...
911 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 ...
448 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 ...
284 views

### How can I fit a matrix function with multiple variables to given eigenvalues?

I have a 5x5 matrix function H[kx] ...
159 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 ...
386 views

### Generating stripes on a polygon

I want to create a Graphics3D polygon that has stripes on it. My code is ...
687 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 ...
119 views

946 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 ...
173 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] ...
129 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. ...
664 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 ...
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 ...
230 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 ...
184 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: ...
264 views

### How to adjust the parameters on a Nyquist Plot?

In order to see some details on a Nyquist Diagram I have used the function NyquistPlot that comes with Mathematica v8 and v9. ...
194 views

### Different expressions for an integral if I split the region of integration

Consider the assumptions ...
153 views

### Rookie mistake in defining a function with Modules?

I can't figure out what's wrong with this piece of code. I'm trying to define a function that counts the occurrences of x, y and ...
749 views

### Plotting discrete data but not using discreteplot function

For a given function: Plot[Sqrt[Abs[x]], {x, -Pi, Pi}] I have the code to draw the function (with its Abs remove), partial sums and cesaro means as: ...
365 views

### Mathematica - set end-of-line characters when importing

I have a plain text file of tab-separated values that was created on a Windows machine. I want to import it into Mathematica on a Mac. ...
2k views

### How to place legend labels for Histogram and ListLinePlots correctly?

I would like to place AxesLabels: For x axis at center of the Histogram and LineListPLots. For y axis rotated 90 degree anti clockwise. I don't see any options for it? ...
153 views

### Mathematica crashes after evaluating a call to a user-defined function [closed]

I have recently installed Mathematica 9 on my macbook pro, os version 10.6.8. As you can see in the minimal example notebook you can download here: ...
348 views

### Wolfram Workbench - how to rename local variables

I'm refactoring some old code. I used really short names for local variables, which I'm coming to regret. Is there an easy way to rename local variables in scope using Wolfram workbench? Here is an ...
133 views

### What's the difference between the following two codes?

I have two codes to find the integer numbers $m$, $x$, $y$, $z$ in the system of equations. First code ...
103 views

### Trig angles simplifying in worksheet

I would like to generate a table of trig questions such as: ...
761 views

### Pattern matching a pattern with patterns

Confusing title, I know. But the question is, if we have two patterns which have the same general structure but different names used in the patterns and different names: ...
348 views

### How to find Image Size of a control object?

I want to find the ImageSize or at least dimensions of any control object irrespective of it being an image or an any other control such as ...
284 views

### Implementing Rayleigh criterion method for finding the resolution of an optical system

I want to use the Rayleigh criterion to find the resolution of an optical system. I have two functions f1 = Sinc[x]^2 and ...
292 views

### How can I find minimum and maximum of a region?

I have a regionplot like the following: ...
267 views

### Wolfram workbench syntax highlighting for local variables inside compile

Lately I've been working quite a lot with Compile. I also started using Wolfram Workbench. So a natural question arises: Is it possible to have syntax ...
188 views

### how to open Hyperlinked files by default software?

Non-Mathematica formats, e.g. .doc or .txt files, are directly shown in a new notebook when I click on a hyperlink pointing at these objects. But I would rather have (for example) .doc files opened ...