# All Questions

238 views

### Element-wise test on List elements

This question could sound pretty silly but I can't find a way to apply element -wise tests to a list. For example if I digit ...
51 views

### How could I check if a differential equation crosses a specific value? [closed]

I'm designing a magnetic field to simulate relativistic speeds in a small cyclotron. I need to see if the ratio -R/B * dB/dR crosses 0.2 in a certain range, and right now I'm trying to do that by ...
32 views

### NIntegrate within NMinimize - how to optimize the code?

How I can optimize these numerical calculations? Most annoying is encountering instabilities (numerical errors). I have a predefined function: ...
19 views

### Minimum bounding rectangle of point set of image data + relative position

I have an image and a subset of points for which I want to get the minimum bounding rectangle (MBR), along with its relative position in the source image (so I can edit it somehow then restitch it ...
261 views

### f /@ # & /@ # & /@ # & /@ # & /@ # & /@ # & /@ # & /@ matrix

How can one write f /@ # & /@ # & /@ # & /@ # & /@ # & /@ # & /@ # & /@ matrix in one line with arbitrary level and without using ...
75 views

### Singularity problem of a 2nd order differential equation

I would greatly appreciate your help in implementation of Mathematica for solving a 2nd order differential equation expressing some important engineering problem. Apparently, this equation has no ...
31 views

### Mojibake problem (encoding error) when import data into mathematica [closed]

I am using Mathematica 10.2.0.0 When I tried to import a txt file contains Chinese characters into Mathematica, it is just a mess. Here is a sample txt file. It contains Chinese characters as follow ...
59 views

### How do I get the last three vectors to complete this cube?

Looking at this file, what vectors do I need to add to the cube:={...} in order to get a full cube?
64 views

### How do I get all possible paths in terms of edges, and not vertices in Mathematica?

Suppose I have an undirected graph ...
38 views

### In a list of Disk, how to efficiently delete Disk which are close to other Disk? [duplicate]

I want to draw pictrue like this: My code is: ...
49 views

### Use default ListDensityPlot color scheme in ArrayPlot?

I have some data that I would like to display in an ArrayPlot. I like the default color scheme of ListDensityPlot (Mathematica ...
36 views

### Use FindRoot to plot function restricted to path through domain

I have a function complex-valued $z(x,y)$ defined on a torus and I have a nice routine which plots paths through $(x,y)$ space satisfying the constraint $\rm{Im}(z)=0$: ...
128 views

### Put markers in the maximum values in a Plot

I have made my graph of a list of data with the following code: ListLinePlot[data, PlotMarkers -> {Automatic, 10}] So this way I can see some markers in the ...
319 views

### Prime factorization

I am trying to find a code that will output the prime factor decomposition of a number but for some reason I keep getting error messages. It is supposed to output the exponent of 2 and the odd factor. ...
33 views

### Simplifying nested KroneckerProducts

Any suggestion how to bring a nested KroneckerProduct form into just one? I mean some how converting ...
59 views

### Overriding a built-in function with custom coded procedures

Sometimes it might be useful to override Mathematica's built-in functions with custom code that is either more specific or more efficient (or even less "smart"), but at the same time keeping the same ...
79 views

### FillingStyle and Opacity won't work together in Mathematica

I try to plot some data in Mathematica using the ListLinePlot[]. Unfortunately the plot option ColorFunction, ...
60 views

### How to Change Vertex List in a Grid Graph

I would like to actually change the vertices in a grid graph instead of simply changing the label. Ultimately, I want the vertices to be points on a plane. So if given a simple grid graph ...
74 views

### Untangling delayed definitions and substitutions [on hold]

I am attempting to find the values of B1 and B0 that will minimize a metric. In the code below I define the metric and then attempt to calculate is by substituting in the current values of B1 and B0. ...
149 views

### Boson commutation relations

I have tried to adapt this answer to my problem of calculating some bosonic commutation relations, but there are still some issues. The way I'm implementing the commutator is straightforward: ...
53 views

### Heliocentric coordinates in PlanetData

I tried to use planets' HeliocentricLongitude and I wonder if anyone has any insight on what coordinate system they use. I took vernal equinox times from http://ns1763.ca/equinox/eqindex.html and ...
31 views

### How to export a list of graphics to a multi-page PDF, each on its separate page? [duplicate]

I tried with these codes: g1 = GraphData[{"Complete", 8}] g2 = GraphData[{"Complete", 4}] Export["Graphs.pdf", {g1, g2}] SystemOpen["Graphs.pdf"] to shown these ...
32 views

...
81 views

### Is this a bug in Mathematica 10.2 [closed]

I am using Mathematica 10.2.0.0 First, I define the following function ...
38 views

### Definition of a function depending on a sequence

let $a_{n}$ is a given fixed sequence, say $a_{n}:=1/n$. I would like to define something like $$D_{j}:=\sum_{k=1}^{j}\frac{1}{j!}BellY[j,k,\{a_1,a_2,\dots,a_{j-k+1}\}].$$ Function BellY is ...
98 views

### Numerical integration of oscillatory function

I am trying to evaluate the following oscillatory integration numerically but the answers are wrong or not accurate enough. I don't know what the problem is. ...
60 views

### Only real numbers (Fullsimplify) [duplicate]

I've to do some complex calculation with Mathematica and if I put in my code it gives me something big back, so is it possible to say that my variables are strictly real numbers, by sing the ...
74 views

### How to create a mirror-symmetrical list

My data file can be found here: data data = Import["mnl.out", "Table"]; First we remove the headers ...
55 views

### Copy/Paste of a plot leaves whitespace

I'm trying to copy Mathematica figures into word, but when I do, I get tons of extra white-space for some reason. Either standard ctrl-c - ctrl-p or "copy graphic" does this. I understand that I ...
171 views

### How to change symbols in differential equation with a single rule?

Problem Suppose I have a differential equation such as $\qquad f'(x)+f(x)=0$ and I want to change it into $\qquad y'+y=0$ My Method Using ...
104 views

### Fast calculation of discrete logarithms

Does Mathematica have any built-in fast algorithms for calculating discrete logarithms over $(\mathbb{Z}_p)^\times$ (the group of integers modulo $p$)? Essentially, for a fixed large prime ...
101 views

### Drawing a RegionPlot but for data instead of a function

I am trying to draw something similar to RegionPlot, but instead of functions I only have data matrices. For example, I have the following 3 pieces of data ...
141 views

### Why do singularities disappear when performing convolutions with the Dirac Delta function?

I am attempting to perform a convolution involving the Dirac Delta function: $\int_{-\infty}^{\infty} \frac{1}{t+1} \cdot \delta(t+1)\ dt$ I would expect that the result of this integral is ...
34 views

### How can I solve equation system with constraint? [closed]

How can I solve this in Mathematica. Solve[f1(a)==0,f2(a)==0,f3(a)==0,...f80(a)==0,a[[i]]>=0, {a1,a2,a3,...,a80}] When I define like ...
52 views

53 views

### How do I combine a Plot and a ListLinePlot inside a Manipulate? [closed]

I have this Manipulate with a Plot ...
34 views

### Holding dynamic until all options are chosen for an interactive plot

I want to control the variables (and other options) used in a plot through a number of popup menus. As the plot takes a little time to be drawn, I want to be able to make a selection on each of the ...
147 views

### How to convert the binarize-picture to a Region

The Region of Mathematica is nice,and is the new conception of version 10.0.I can convenient get ...