2
votes
1answer
1k views

Inverse gradient operator

I found a nice paper about inverse vector operators here. I have successfully implemented a Mathematica function for most of them, however I can't figure out how to do inverse gradient (page 7 in the ...
1
vote
1answer
209 views

How to rewrite a nested loop with Reap and Sow [closed]

I was wondering if anyone know how to rewrite the following nested loop but using Reap and Sow. I need to reduce the execution time. Thank you. ...
0
votes
1answer
87 views

NMaximize against LinearProgramming [closed]

i'm starting my studies of Operational Research with Mathematica and i'm stuck on a problem with 12 variables. In fact, I was able to solve the problem using ...
0
votes
2answers
122 views

NDSolve ensemble of initial points

I want to illustrate how the differential equation depends on the initial conditions. First if all differential equations: ...
0
votes
2answers
100 views

Solving a system of two equations

I have a system of two equations with the variables T and X that I tried to solve: ...
15
votes
3answers
271 views

Partitioning with constraints on subsets

Given the following data: constraints = {{11, 2}, {11, 3}, {11, 4}, {11, 6}, {11, 9}, {1, 6}, {5, 6}, {2, 5}}; weights = {3, 7, 3, 2, 4, 2, 2, 2, 3, 2, 1}; I ...
0
votes
1answer
37 views

Relationship between input and output coefficients

This is the starting point: ...
2
votes
1answer
196 views

How can I make a map of Sierra Leone at the district level?

Hi I am trying to make a map of Sierra Leone and am running into trouble. SL has 4 provinces: Northern, Southern, Eastern, and Western, which are diced up into 14 districts as shown here: ...
5
votes
4answers
208 views

Functional way to Climb an Association Decision Tree

Associations are nice tool to create decision trees. Here is a toy example of how I'm starting to use it: ...
0
votes
1answer
41 views

Breaking term order ties [duplicate]

I am interested in creating a table with positive Gaussian integers listed in order based on their norms, with ties broken by lex order. So far I have ...
1
vote
2answers
230 views

Turn list of rules from radians to degrees, match all greek letters

Is there a easy way to match Greek letters only. I am trying to lower the angst of bachelors level students by keeping things as low level familiar as possible. Now understandably Mathematica counts ...
3
votes
0answers
136 views

PlotRange->Automatic the exact function used to calculate outliers

I know that PlotRange->Automatic does the following: "the distribution of coordinate values is found, and any points sufficiently far out in the distribution ...
1
vote
1answer
75 views

Why does TimeSeriesShift is just adding a fixed number of days?

I'd like to shift all contents of a TimeSeries object by one month. By shifting Feb. 1st I would expect to receive Mar. 1st. However it's not the case for Mathematica: ...
5
votes
2answers
420 views

Code elegance and compactness. Help needed with Map, Apply

I need some help with code optimization and compactness. I have a set of two-dimensional points and I can use the Mathematica function FindClusters to find 4 clusters. I'd like to plot the points ...
1
vote
2answers
120 views

Simplify power of KroneckerDelta

Why doesn't Mathematica simplify the following expression: FullSimplify[KroneckerDelta[x,y]^3] Since KroneckerDelta only ...
2
votes
1answer
146 views

Mathematica is able to compute an indefinite integral but not the corresponding definite one

I'm trying to compute the following definite integral (μ is a parameter): ...
3
votes
1answer
100 views

Change group generators?

I want to make Cayley graphs for the same group, but with different generators. Is there any way to represent a group, besides a cumbersome permutation representation or using the default Mathematica ...
9
votes
2answers
345 views

VectorScale Explanation

I'm having great difficulty understanding VectorScale. Here are the definitions from the documentation. With the explicit specification ...
0
votes
1answer
71 views

Weird Vectorplot

I would like to Plot a simple Vector Field, all vectors normalized to one. If i for example take a evenly distributed sample of the field and plot it with the ListVectorPlot function, i get a plot ...
13
votes
2answers
376 views

How to speed up the plotting of B-spline curve?

Three months ago, I asked a quesion about B-Spline basis function here, Today, I used this function to plot B-spline curve. The definition of $N_{i,p}$ ...
2
votes
2answers
619 views

Placing text within a plot

I want to place text within a plot. The text is always centered relative to the coordinates. How can I left-align or right-align the text relative to the coordinates? For example: ...
4
votes
1answer
142 views

DSolve not returning a rule

I am trying to solve a PDE, but the DSolve is not returning a rule. How exactly can I get Mathematica to yield a solution? ...
1
vote
1answer
89 views

TogglerBar with arbitrary dimensions

I'd like to split my TogglerBar into several rows, with it's length given in a list. I found the Appearance options, but they ...
4
votes
2answers
2k views

Image processing: Calculate the area of the region of interest

I am trying to compute the area of a particular region of interest from images which are obtained from an experiment. The original data looks like this: I have to calculate the area of the region ...
8
votes
2answers
686 views

Probability: Calculating a multiple integral

Find the value of $P[\Pi_{i=1}^{10}X_i > C]$ for $C=2,5$, where $X_{10\times 1}$ is a random vector with $10$ dimensional Cauchy Distribution having location parameter $\mu_{10\times 1} = ...
3
votes
1answer
91 views

AdjacencyMatrix: Unexpected output

I have a graph defined as follow: ...
0
votes
2answers
118 views

Finding permuations in a specific order

I would like to find the following permutations, but need an elegant way of computing it. Ideally I would like to have a variable determine the highest number in the last element and find all ...
0
votes
0answers
84 views

How to accumulate elements in a list using Reap and Sow [duplicate]

Does anybody know how to rewrite this fragment using Reap and Sow instead of AppendTo. I need to reduce the execution time. Thank you. ...
7
votes
1answer
170 views

Instant kernel crash when using `+=` on `SparseArray` with repeated entries

Bug introduced in 5.2 and fixed in 10.1.0 Not sure if this is known behavior or not, but the following two lines produce an instant kernel crash (I'm using Mathematica 10.0.1 Windows 64-bit): ...
1
vote
1answer
131 views

Fitting with roots of transcendental equation

I'm new to this community and my first question probably reflect my lack of confidence with Mathematica. My problem is the following: I find the roots of a transcendental equation dependent on a ...
5
votes
2answers
285 views

Manipulate: Play the animation only once and stop

I do small animations with Manipulate, but sometimes I don't like that it runs over and over again from start. I would like to have the possibility to stop the ...
2
votes
2answers
72 views

How to programatically set options for a selected word?

I want to create a palette with buttons and have it apply to the selected word. No matter what combination I try it always applies it to the entire cell. Imagine that in the sentence: ...
0
votes
1answer
184 views

OpenCL matrix multiplication on Mathematica

I took a matrix multiplication written using OpenCL from here: ...
-3
votes
1answer
124 views

How to make X and Y = Z? [closed]

Hello I have a big question, maybe it's extremely easy but for now I'm unable to make it work. I'm a programmer and what I need to do is for example: if X = 2 and Y = 1 then Z = 1 if X = 3 and Y = 1 ...
2
votes
1answer
619 views

How to implement the directed Barabasi-Albert algorithm in Mathematica?

Does anyone know how to implement an efficient version of the [directed Barabasi-Albert algorithm][1] in Mathematica that scales until hundred of thousands nodes? The directed network mechanism is ...
4
votes
4answers
635 views

All binary sequences with length n

I don't know if there is a built-in function for this, but I'm thinking about something like this Outer[List, Table[{0,1},{n}] ] But ...
5
votes
3answers
407 views

Bug in complicated Limit

The code Limit[Log[2 - Sin[x]*Cos[x]], x -> Infinity] outputs Interval[{0, Log[3]}] in Mathematica 10.0.2.0 . It should ...
13
votes
1answer
401 views

How can I detect if an image is in or out of focus?

I need to filter out bad (blurry or ) images from a set, with some sort of blur detector.
1
vote
4answers
386 views

Mapping Contour Plot onto ListPlot3D (or by using color variations) [closed]

I am trying to overlay a contour plot I have created on a ListPlot3D graph. I have seen a few questions answered on this website that answer my basic question. ...
1
vote
1answer
88 views

How to insert Tooltip into incidence plot?

I'm trying to make a graph using a file .NET extracted from a file .CSV and to make tooltiped the vertices' labels. Initially I ...
0
votes
1answer
143 views

Why is chop being ignored? [closed]

If I use Chop[10^-4, 10^-3] then I'd expect the output to be zero. However, this is not the case. There is of course a very easy workaround since I can define ...
3
votes
2answers
118 views

Toggle plot visibility of dynamic number of data sets

I have multiple curves in my plot, and want to be able to toggle their visibility off/on. Which I got to work thanks to a different post. ...
0
votes
0answers
75 views

Computation doesn't Finish

I'm trying to solve some problem by the following code: ...
2
votes
1answer
87 views
1
vote
1answer
92 views

Why does Mathematica Spawn Additional Dock Icons on OS X?

I've been running a calculation in parallel that requires a rasterize, and doing this requires one to wrap the rasterization with a UsingFrontEnd command (as is ...
9
votes
1answer
1k views

FEM - how should I impose periodic boundary conditions in pure space problems?

I have searched other threads, but I was not successful in finding an answer I could understand. Right to the point: how do I impose correctly periodic behavior on the edges of the rectangular ...
5
votes
2answers
436 views

How would I programmatically add a row to a Dataset?

I would like to use a Dataset to track the process of a lengthy calculation over a large volume of material. Dataset appeals to me because of the power of the queries and it also looks like it may ...
6
votes
0answers
178 views

Kernel sometimes quit after second evaluation of ListVectorPlot

But introduced in 10.0.0 and persisting through 10.3.1 In Mathematica 10.01 Linux x386 execution of the expression ...
9
votes
3answers
394 views

Generalization to AllTrue, AnyTrue and NoneTrue

I am wondering if there is a natural Mathematica way to generalize those functions. To be specific, All three functions AllTrue, ...

15 30 50 per page