6
votes
1answer
455 views

Efficient JSON parser for Mathematica

Im looking for a efficient way of parsing JSON data in Mathematica. I am having a lot of problems with ImportString because it uses Java, is too slow, and uses too ...
1
vote
2answers
139 views

How to sort the adjecency matrix of bipartite graph so to have two off-diagonal blocks

In a bipartite graphs there are two class of nodes, say A and B. Each node of class A may interact only with nodes of the class B, and viceversa. The corresponding adjecency matrix is thus composed by ...
1
vote
0answers
73 views

Solving for a charge distribution from a dipole moment [closed]

I've been looking around but I haven't been able to find any way of solving this conceptually simple problem. In short I am trying to find the charge density in a dielectric in an external electric ...
5
votes
3answers
425 views

Where can I find a dark stylesheet for mathematica?

The default white is very tiring for the eye after some hours.
0
votes
2answers
144 views

Expand expression into quotient of negative power series

I have a function T(z) and want to expand it to the following form: At the end I want to have a list of equations, which can calculate a0, a1, a2, b0, b1 and b2 with different values of h1, h2, ...
0
votes
2answers
72 views

How can I troubleshoot a PDF that fails to import?

I'm trying to import a PDF file whose text I'd like to parse, but I'm getting an error with no explanation: ...
4
votes
3answers
350 views

Finding parameters making real part of eigenvalues vanish

I have the following $\;3\times3$ matrix: $\left( \begin{array}{ccc} 0.04 -0.4 b & 0 & 0.04 -0.4 b \\ 0 & -0.08-1.2 b & -0.06-0.9 b \\ 1.04 -0.4 b & 2.08 -0.8 b & 0 ...
3
votes
1answer
231 views

Surface area of intersecting spheres

Given a sphere of radius 1 centered at the origin and $n$ spheres with radii $r_i$ centered at predefined coordinates, $c_i$, in space, I am after the surface area of the unit sphere that is not ...
2
votes
1answer
176 views

Integrate does not accept my integrand expression

I want to calculate the symbolic integral, but I could not obtain the final results from Mathematica. ...
1
vote
0answers
86 views

Inhomogeneous phase-portrait with StreamPlot [duplicate]

I have a problem with a must-be simple streamplot. The potential function governing the motion is U, and I have the following code in Mathematica: ...
4
votes
1answer
285 views

Understanding of method for NDSolve

I used automatic method for NDSolve. Then I asked myself - which method Mathemathica prefered? I got an answer for this question on this forum, that I need to use: ...
1
vote
1answer
68 views

How do I visualize the result of EdgeColoring[g]?

Combinatorica has a heuristic edge-coloring function EdgeColoring. When I execute it on a graph, the result is a list of integers. My guess is that an integer $i$ ...
3
votes
2answers
97 views

Finding all instances of length $N$ common subwords in two strings

Given a pair of strings, I'd like to return a list of all common subwords of a fixed length of "n" characters (i.e. contiguous subwords of length "n" that occur in both strings), allowing for ...
0
votes
1answer
80 views

How to test if any set of pairs contains elements of other list? no matter order of elements

I want to detect if a set of pairs, for example a={{2,5},{6,3},{1,4},{8,7}} contains a given pair, for example tabu={{4,1},{2,6}} but don´t be relevant the order inside pair (pair {i,j} is equal to ...
2
votes
1answer
373 views

Different Poincaré maps for same Equation

I've seen the Wolfram Poincaré example. I'd like to modify this sample in order to have a list of Poincaré maps. In the example the event is captured only when ...
0
votes
0answers
27 views

How to switch elements i,j in a list? [duplicate]

Are there any direct function to switch elements i,j in any list? or is necessary to create one with Do / If ? (I don´t ask for making me this function if it doesn´t exists) My target is can ...
6
votes
3answers
540 views

Visualization of matrix transformations

I define the "matrix transformation" here as follows: $\left[ \begin{matrix} x_1' \\ x_2' \\ \end{matrix} \right]=\left[ \begin{matrix} a & b \\ c & d \\ \end{matrix} ...
7
votes
2answers
398 views

Nothing appears in simple plot

I'm trying to get the following simple code to work. (The code is just supposed to graph the norm of the second derivative of a vector function). ...
0
votes
1answer
62 views

Questions regarding DictionaryLookup of Mathematica

a. Make a function longest[lang_] that gives the length of the longest word in the dictionary of lang. You should get ...
4
votes
1answer
214 views

Find lengths of contours in a ContourPlot

I am trying to find the lengths of different contours in the following plot: It is a complicated piecewise function evaluated on the unit disk. I am hoping there is an easy, generalized way to ...
4
votes
1answer
255 views

Butterworthfilter data filter

I am currently doing a signal analysis and filtering using Matlab. The filter I am using is Butterworthfilter model to filter scattered data (vector data). I am using Matlab as follows: ...
1
vote
1answer
64 views

load static library (.lib) using NETLink

is it possible to load static library (.lib) compiled in c++ using NETLink or similar in Mathematica?
1
vote
0answers
69 views

Why does Network`GraphPlot`wrapper appear in my GraphPlot?

I'm making a GraphPlot of data similar to this: ...
0
votes
0answers
56 views

Fold Dynamic Function [duplicate]

I'm making on a demo working with differential equations as functions of two variables (x and y). The demo will have to Fold the differential equation with an initial y-value and a series of x-values. ...
0
votes
0answers
66 views

How can I include a popup menu in my wizard's content?

I'm trying to create a wizard that enables the user to choose between different shaft components. At the same time, I need a flag to be 1 if he chooses a bearing and 0 otherwise. I extended the ...
7
votes
3answers
299 views

Different colors for nodes in tree plot

I have some list of numbers which I am plotting using TreePlot. This is the code: ...
3
votes
2answers
200 views

Import multiple files from folder in order of date added

I have a folder that contains certain files I want to import. In my case those are .png files. As all the files I want to import contain the phrase "accum" in their filenames, I can use ...
1
vote
0answers
77 views

ImageCapture on Windows 8.1 [closed]

I have an Asus SmartTab tablet with Mathematica 9 on it. When I run ImageCapture, nothing shows up in the image window. Originally running this completely crashed ...
5
votes
1answer
187 views

Why does Arrow not work well with Scaled coordinates in 3D?

I am a little puzzled by the fact that if I try to use Arrow with Scaled coordinates in 3 dimensions the arrowheads are all over ...
6
votes
1answer
200 views

How can I get this Graphics3D to rotate around a particular sphere?

I made this Graphics3D of the Sun with the plotted orbits of a few astronomical objects. ...
4
votes
2answers
82 views

Document Creation: inserting a grid

This question is strongly related to: NotebookWrite Cell with Grid Let’s create sample chart ...
1
vote
0answers
29 views

Is there a way to convert InlineCell to InputForm once and for all?

After asking a question about making InlineCell similar to Input, I realized that by typing Shift+Ctrl+I I really can manually convert every InlineCell to InputForm. So my new question is: Is there a ...
6
votes
1answer
233 views

If doesn't compile if its output is the output of Compile?

The smallest sample I can find to reproduce this problem is: test = Compile[{}, If[True, 1]]; << CompiledFunctionTools` CompilePrint@test ...
9
votes
2answers
356 views

Measuring curve length on a binarized image

With the help of almighty Mathematica 9, I got from this To this: with this code: ...
0
votes
0answers
50 views

Export Messing Up Alignment of Bar Chart

Here is my code: ...
5
votes
4answers
189 views

ContourPlot refuses to show in-figure PlotLegends after turn on ContourShading

I would like to do a contour plot with a label inside the figure. For example, the following works well. Note there is a small "example" at the right bottom figure. ...
0
votes
0answers
44 views

How to get integer/rational and real eigenvectors to be the same? [duplicate]

forgive me if I missed this already being answered or too easy. Given a matrix: q = {{1, 3, 5}, {7, 11, 13}, {1/3, 1/7, 1/13}}; Eigenvectors are different here: ...
8
votes
4answers
968 views

Filling a curve between a line and the x-axis

I'm trying to plot the function $f(x)=\dfrac{1}{x^2}$, filling the square area from (0,0) to (1,1) with purple and filling the area under the curve from 1 to 4 with red. However, Mathematica is not ...
4
votes
2answers
88 views

How can I make a stylesheet where inline cells have are styled like input cells?

How can I make a stylesheet where inline cells have are styled like input cells? By "similar", I mean the same font and syntax highlighting. I have even tried copying all settings from ...
1
vote
2answers
122 views

Few quick Mathematica questions about Dictionary

a. Get the list whose elements are of the form {language,number of words in dictionary) I tried this, and it gave me the number if words in dictionary, but I don't know how to get the language part: ...
7
votes
1answer
376 views

Using KalmanFilter or KalmanEstimator

I have the following: ...
0
votes
1answer
55 views

Help with Reduce, quadratic system of inequalities

I'm trying to obtain an equivalent system of inequalities to the one below but without the variables x and z. Somehow Reduce just repeats the command. ...
0
votes
2answers
121 views

SplicedDistribution - different definition across Mathematica 9?

I am having troubles with my notebook. I succesfully defined Asymmetric Laplace Distribution at school using SplicedDistribution function, and Mathematica was able ...
1
vote
1answer
154 views

How to specify the centre or PlotRange of a Graphics3D?

When I create a Graphics3D, I often want to place an object right at the centre of the box. Initially I thought that the centre was specified by ...
11
votes
1answer
270 views

Bizarre behavior of With, Compile and Break

I'm guessing this is almost certainly a bug in Compile (because they're fairly common), but it's pretty weird and I spent about an hour tracking down the issue and ...
0
votes
4answers
153 views

RSolve fails on a two-equation non-linear system

I have a system of just two recurrence equations, I need to solve them and so I use RSolve: ...
3
votes
1answer
159 views

Determining the dimension of a probability distribution

Functions like Mean and RandomVariate clearly infer the dimension of the distribution passed to them. One can also usually ...
0
votes
0answers
106 views

complicated Numerical Integration, FEM application

I am trying to calculate a 2d Integral which has another 2d integral in the integrands. here is the setup: ...
0
votes
0answers
111 views

Mathematica function Det has unexpected behavior

I am using Mathematica "Kernel" -> {"Version" -> "9.0 for Microsoft Windows (64-bit) (January 25, 2013)", "ReleaseID" -> "9.0.1.0 (4055652, 4055188)" on a Win 7 machine. The file listed below uses ...
1
vote
1answer
114 views

Generate a list of values with equal number of each value

I want to create a list of 32 values such that from {a,b} I can generate ...

15 30 50 per page