# All Questions

296 views

### Cropping a non-cubic lattice unit cell

I would like to crop the hexagonal close-packed system as a hexagon and not as a cube. I would like to use the following volumetricPlot already given on this ...
105 views

### ListPointPlot3D in a Manipulate

I have a program using Manipulate. The program given certain values will compute some values. I want these values to appear in a 3D list plot but the problem I am ...
48 views

### Evaluation of m.v is blocked by applying MatrixForm. Why? [duplicate]

I'm trying to understand what is happening in the notebook session below. I have a 2x2 matrix m = {{-1,-1}, {-1,-1}}. And a vector ...
122 views

### Export LocatorPane as image by button

How to Export LocatorPane as image by button or at least by something else? Kuba, thank you! Your method works in a simple case: ...
548 views

### Interpolating a plot with missing values

With data = {{1, 1}, {2, 2}, {3, 3}, {4, 4}, {5, 5}, {6, 6}, {7, 5}, {8, 4}, {10, 3}, {10, 2}, {11, 1}} and ...
1k views

### Can Mathematica do two evaluations at the same time?

When one evaluation is running, if I want do another evaluation, Mathematica will put the second one in the queue and run it after the first evaluation finish. However, the first evaluation may take ...
144 views

### plot totally fragmented, WorkingPrecision,matlab comparison

I am trying to plot ...
188 views

### Is there a better way to create my rotational-symmetric (180 degrees) rectangles?

I have created a simple way to create rotational-symmetric (180 degrees) rectangles, but my stuffit function bothers me. No matter what I tried, I couldn't get it ...
317 views

### Remove borders in a series of images

I have a series of mouse MRI images, here are two How can I automatically remove the metal cage around the mouse to make it look like this: The position of the cage is not always in exactly ...
360 views

### How do I built a zoomable Koch curve?

I'm new to Mathematica and my goal is to write a simple program in order to demonstrate self-similarity of the Koch curve by zooming in. Here is a good example of what I mean (it's a Java applet). I ...
121 views

### Highlight the same symbol throughout notebook

Once I saw people using Matlab use a keystroke shortcut that made all the same symbols as a selected symbol become blue. I am wondering is there is a function in Mathematica that is similar. If so, ...
483 views

### Correct way to integrate a certain function

I want to integrate $$\int_{0}^{2\pi} dt_1 \frac{a + b\cos(t_1 - t_2)}{c + d\cos(t_1 - t_2)}$$ where $a, b, c, d, t_2$ are real numbers and $c + d > 0$ & $0 \leq t_2 \leq 2\pi$. I used a ...
113 views

### Does the syntax coloring I see indicate a real problem?

I need a behaviour provided by: x = 2; Block[{x = HoldForm[x]}, x] x FrontEnd marks ...
73 views

### Apply a function to the current selection in place

Say a have the function foo: foo[x_] := x + 2 Like the Evalution ...
189 views

### How to simplify an expression into the sum of small fractions

I'm trying to simplify the following expression $$\frac{n.r \ p.q - (n.p + n.q) (p.r + q.r)}{(n.p + n.q)\ p.q}\to \frac{n.r}{n.p+p.q}-\frac{p.r+q.r}{p.q}$$ When I put it into Mathematica and use ...
417 views

Is there a way to convert a Delaunay Triangulation into a Graph structure so that one can generate an AdjacenyMatrix of the Delaunay?
370 views

### Generate a set of 3D coordinates subject to constraints

Generating a set of random 3D coordinates is ok, e.g. ...
158 views

### Correct graphical representation of a discrete function (PMF)

I have a list: {1,2,2,3,3,3,3,4,4,5}. I want to plot the percentage occurrence of elements in the whole list. So the list plot I want to do is: ...
60 views

### Failing to get colours in Plot [duplicate]

When I plot the functions generated by NestList, I do not see differently coloured lines, which I do if I explicitly list them out. I.e. with: ...
181 views

### Replacing High Densities of 1.s in Very Large Binary Arrays

I am working with very large binary arrays on the order of {100,100000}. It may look something like this. ...
221 views

### Diagonalization in parallel

I would like to diagonalize one unitary non-sparse matrix of size 12870 with complex number entries (not symbols, this is really a numerical problem). Is is possible to make eigensystem run in ...
129 views

### How can I add points on a plot?

I have a list of points that I want to a plot, but I can't figure out how to do it with Epilog. Here's the code I have so far: ...
461 views

With ...
978 views

### Generating list of alphabet letters

I want to create a list of length n with the letters of the alphabet. For example, if n = 3, by list would be ...
97 views

899 views

### Integrating a functional of an InterpolatingFunction

It is straightforward to Integrate an InterpolatingFunction. However, even for a simple functional of an ...
123 views

### ToExpression and Fortran notation

ToExpression["9.0E-03"] interprets the string as 9*e - 3 instead of what I am expecting: ...
251 views

### Convert Tube[BSplineCurve[…]] Graphics3D object to polygons [duplicate]

I wish to voxelize a complex shape composed of Tube[BSplineCurve[...]] objects, while maintaining the additional information of the (unvoxelated) surface normal ...
450 views

### How to eliminate the margin between figure and frame in DensityPlot? [duplicate]

In DensityPlot, how to get rid of the white margin between the figure and the frame so that the figure itself spans the entire domain? ...
1k views

### Plot a function based on Derivative - Gradient field

I'm trying to plot the gradient field of a function in such a way that is possible to change it easily, only editing the function. Consider the code: ...
103 views

### FullSimplify assumptions for function body

I'd like to pass an assumption to FullSimplify so whenever it gets a function that is squared and square rooted would return me only the function body, without ...
87 views

### How do I get a different (random) independent edge set each time I run FindIndependentEdgeSet?

I'd like to use FindIndependentEdgeSet[g] repeatedly to get random maximal matchings of a fixed graph, but each time I call this function it gives me the same answer (i.e. the same list of edges). ...
73 views

### Package FiniteFields

In a Mathematica session, I evaluate: Needs["FiniteFields`"]; fld = GF[2]; Now, for example, I'd like to compute $a^3+a^5$ for $a \in{Z_2}$. The result I'd like ...
193 views

### Using variable with delay in WhenEvents in NDSolve

I have a system of differential equations which is solved correctly. However, I want to trigger two events, one of which depends on the "time elapsed" after of the first event trigger. Is it possible ...
143 views

### What is the formula Mathematica uses for ZetaZero?

What is the formula/algorithm Mathematica uses for the ZetaZero command?
82 views

### Abstract algebra: define constants in a finite field

How can I to define a constant in $Z_{2}$? For example, I want to create a constant b that inherits the properties of an element from $Z_{2}$. For example ...
140 views

### Why is ListLogPlot skipping entire decades?

I'm having an issue with Mathematica wherein, when trying to use ListLogPlot, the scale of the y-axis skips entire decades. Instead of 1, 10, 100, 1000, it goes more like 10^2,10^4,10^6,10^8. I need ...
101 views

### Apply function to output of previous function

I am trying to write a function that takes 3 tuples. Each tuple contains two lists which are first divided. This results in 3 lists. Then I want to take the Mean of all the columns. I can do this ...
180 views

### How can I remove edges from my DiscretePlot?

By default, DiscretePlot displays "edges" along the sides and, prominently, align the top when ExtentSize -> Full is set. For ...
175 views

### Passing an internal static class in JLink?

I am trying to get started with the Stanford NER tools tools in Mathematica, and am having difficulty translating the demo they provide into JLink. The relevant code in the demo is: ...
116 views

### Unify the sampling of NIntegrate[ {f, g, h} w ]

I'm trying to numerically integrate a function which has a vector-valued slow part and a much faster component which is shared by all the components, i.e. an integral of the form  ...
537 views

### How do I get Mathematica to return a function call unevaluated?

How do I get Mathematica to return a function call (conditionally) unevaluated? I expect this may use the slightly-mysterious Hold function. As a toy example, ...
36 views

### Data Fitting with xerrors and yerrors using findfit [duplicate]

I'm trying to fit data with xerror and yerror using "Findfit", so i'm trying the same form than in tuto : ...
88 views

### A problem with parallelize

I am experimenting with Parallelize and ParallelTable This is the code I am using: ...
49 views

### Get value for a variable from user inside a module [duplicate]

I am writing a module. When I run the module, I want it to ask for a variable, like I can in other programing languages such as C++ or Python. For example, in C++: ...
83 views

### Evaluating expressions stored in notebook from Java

The Mathematica kernel can generally open a notebook and evaluate the functions present in the notebook using UsingFrontEnd Command. Example: ...
94 views

### Adding a legend to a MatrixPlot

I have produced this MatrixPlot: Rows refer to countries and columns to ranks. Row 1 refers to Norway with many 1 ranks, row 15 to Greece with many 15 ranks. Other countries are inbetween. I would ...
94 views

### How to draw a network from a dataset reporting the labels of nodes of every link?

I have a dataset in format .txt of a directed network, containing a matrix A of dimension ...
There are $100$ .dat data files which contain numerical parameters. ...