1
vote
1answer
33 views

Specifying that hierarchical probability distribution conditional on independent random parameters

I would like to create a ParameterMixtureDistribution to model the following: $X \sim $ Binomial($N,P$) $N \sim \mathrm{Poisson}(\lambda) \perp P \sim ...
1
vote
0answers
33 views

Building a ComplexityFunction based on the size of the expression output

I am experimenting with the ComplexityFunction of Simplify and came up with this one: ComplexityFunction->Function[e,Rasterize[HoldForm[e],"BoundingBox"][[1]]] ...
1
vote
1answer
32 views

A While loop where the loop clause can receive problematic input

Consider the following highly artificial example: ...
2
votes
0answers
89 views

Mathematica 10 and Mac [closed]

This might be a the wrong place to post the question, but I am sure that there would be few places where I would find people who would know more about how mathematica works. I am looking to buy a new ...
0
votes
1answer
62 views

presentation of 3D image only

For viewing or discussion is it possible to display a mouse rotatable ParametricPlot3D or Manipulate holding back Mathematica code lines in a slideshow for example?
3
votes
2answers
65 views

How to make overlapped part to be transparent?

I want to ask is it possible to make the overlapped part to be transparent in Graphics3D. ...
6
votes
1answer
255 views

How to add texture to a parametric plot?

I need to put some simple textures to some parametric plots. My textures are not complicated, They are like the first example in here. Is there any simple way of doing this? For example, How can I ...
1
vote
1answer
105 views

Mysterious behaviour of Plot

I'm a little mystified as to the behaviour of Plot. In one case below I am directly executing on a list element. In the other I am (I think) doing exactly the same thing. ...
3
votes
1answer
153 views

How do you make a 3D city population graphic?

I want to make a graphic that has the shape of a country, finds all the cities of that country, gets their coordinates and populations and turns that into a SmoothHistogram3D with the population being ...
5
votes
1answer
108 views

CDF plugin no longer launches in Chrome

I exported a web-embeddable CDF, and created an html page with the automatically generated code. Both are in a local folder. When I open the HTML page in a Chrome browser, i get the PNG image telling ...
0
votes
0answers
45 views

Two installations of MMA 10.0.1.0 differ in behavior

I'm seeking advice on how to track down what might cause the following difference in behavior. I have two independent installations of MMA 10.0.1.0, both on Mac OS X Mavericks on identical x86 Mac ...
2
votes
1answer
38 views

VertexConnectivity and FindVertexCut disagree [duplicate]

I'm trying to use Mathematica to compute the minimal vertex cut for graphs. From what I understood, VertexConnectivity of a graph should correspond to the number of vertices in the minimal vertex cut. ...
1
vote
1answer
19 views

NIntegrate is it possible to evaluate the integral using a user-defined grid?

I am using the NIntegrate function and I would like Mathematica to perform the integration in accordance with a grid I define that is sampled uniformly between the boundaries of integration. Let me ...
1
vote
1answer
44 views

How to make a LogLinearPlot out of an Histogram?

I want to make a histogram with a logarithmic x-axis, like the one produced by LogLinearPlot. How can I do this?
2
votes
1answer
54 views

How do you get a country's GDP per capita in Euros?

Right now, I'm getting the data in U.S. Dollars and converting it to Euros like this: ...
0
votes
0answers
48 views

Optimiazation method L-BFGS-B

I am comparing a result of optimization using R and Mathematica. Mathematica (NMaximize) has found a significantly better (global optimum) result then R (using ...
1
vote
1answer
63 views

Conversion of Sine to Cosine

I'm solving equations with many Cosines and Sines. And I want to convert all the Sines to Cosines using trigonometric formulas such as cos(x)=sin(x+pi/2). How can I do this?
2
votes
3answers
125 views

How to find the kth largest eigenvalue of a matrix, taking into account the sign? [duplicate]

I have a real symmetric matrix m (i.e. its eigenvalues are all real). Eigenvalues[m, {k}] will find the ...
2
votes
2answers
94 views

DictionaryLoopkup - pattern specification

I would like to find all Italian words that have a specific pattern of letter repetitions. Actually I'm looking for 6-letters words that have 1 letter repeated 3 times, a second letter repeated two ...
0
votes
0answers
34 views

Transfer Functions - Time Series depends on a second one

Suppose two time series ...
3
votes
3answers
101 views

Rearranging a Dataset

When processing a larger Dataset I came up do a point where I want to form a dataset with culumn heads from an intermediate structure. Here is an example of this structure: ...
2
votes
1answer
51 views

Vertex Names as Labels in GraphPlots

I'm trying to use GraphPlot to draw a Graph which is constructed from an adjacency matrix and am having trouble with the labels in the plot. I am doing (data is a silly example) the following: ...
-1
votes
0answers
63 views
0
votes
0answers
43 views

when DSolve fails

I am doing this mathematical problem $c*G_{vv}+ d*G_{u} + e*G_{v} +f*G=0$, where $c, d, e$ and $f$- are constant coefficients. I already know that this is second order PDE and we classify it by ...
0
votes
0answers
130 views

Time-dependent mesh deformation

I want to display the result of a deformation with a mesh, but I solved the deformation with a time dependency. So I have two functions: uxsol[t,x,y] and ...
1
vote
1answer
51 views

Evaluating the real part of an expression

I want to get the Real part of this expression - shouldn't be too hard to evaluate. Why is Mathematica not evaluating but returning the same code? ...
0
votes
1answer
22 views

Error with numerical summation - how to specify “n choose r”?

I'm trying to do the following sum: NSum[((50000 - x) choose x)*(1/3^15)^x*((3^15 - x)/3^15)^(50000 - x), {x, 1, 4}] But I keep getting an error saying: ...
2
votes
3answers
123 views

Transform an InterpolatingFunction

I'd like to transform an InterpolatingFunction from NDSolve but can't figure out how. Here's an example. The equation I want to solve is ...
1
vote
1answer
88 views

strictly positive solution to $Ax=b$

How to find in mathematica one real strictly positive solution, if any, of $Ax=b$. A is rectangular matrix. Thanks
1
vote
1answer
82 views

Simple optimization 3D plot

Because this is such a simple example I am not going to explain the calculations. I am strictly wondering why I do get errors when plotting it. ...
1
vote
1answer
54 views

How to get the content size (in pixels) of the output in an output cell?

How to get the content size (in pixels, width and height) of the output in an output cell?
1
vote
2answers
81 views

Strange behaviour of TableForm

...
1
vote
1answer
50 views
9
votes
2answers
111 views

Unexpected result from StringReplace

The following works as expected. StringReplace["xxxyxz", "x" ~~ _ -> "ww"] "wwwwww" And so does this. ...
1
vote
0answers
41 views

Creating a List with Lists as entries [closed]

I'm trying to create a list A which contains 8 same elements. Each of the elements look like {0, 0, 0, 0}. I was able to do it ...
1
vote
3answers
59 views

Defining a function using a preceding expression

How can I automatically define a function inside my Mathematica code using a result (expression) that preceded the point of definition. For example: ...
1
vote
3answers
46 views

While subpartitioning the elements in list using GatherBy, can I corresponding subpartition the elements of an unrelated list?

If we have a list like the following: list1 = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}; And we use GatherBy to subpartition is according to a test function ...
1
vote
1answer
100 views

3d phase portrait for a system of DEs

I'm trying to plot a phase portrait for a system of three differential equations so could anybody help? example for : ...
1
vote
2answers
37 views

Subpartitioning elements of a list based on some h[ri] == h[rj] test

If we have a list of elements: list = {r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12}; I'd like to further partition the elements into sets where, for some ...
0
votes
2answers
103 views

Collect is not giving me the result I expect

When I evaluate Collect[(a ((G m ω)/c^3)^(1/2) + b ((G m ω)/c^3)^(1/2)), c] I get this: ...
1
vote
1answer
99 views

Quantize a real-valued function?

I'm wondering if there's a built-in way in Mathematica to take a function whose output values are continuous, and quantize it to produce a step function. For example, I have the function ...
0
votes
1answer
41 views

nintegrate: greater accuracy possible

I've got the following piece of code: ...
2
votes
1answer
90 views

How to get the ranked order

data = {33, 6, 10}; Ordering[data] (* {2, 3, 1} *) What I really want is, 3 for 33, as it is the 3rd, if sorted; 1 for 6, as it is the 1st, if sorted; and 2 for ...
4
votes
1answer
123 views

Perturbation theory in general relativity using xAct

I'm trying to use the xAct Mathematica package for manipulating tensors, and I'd like to plug in a metric into the perturbation equations to first order in general relativity, and have everything ...
2
votes
3answers
57 views
0
votes
0answers
30 views

Mixture / Hierarchical Distribution from Conditional

How does Mathematica handle Hierarchical distributions. For example, if I have X|Y ~ Poisson(Z) Y ~ Exp(lambda) Z ~ Normal(0,1) First, of all, the distribution of X is only given conditionally and ...
1
vote
2answers
99 views

Get inverse of a matrix step-by-step [duplicate]

How can I get the inverse of a matrix step by step? An example: Given the matrix {{8, 2}, {3, 2}}, the result is {{$\frac{1}{5}$, -$\frac{1}{5}$}, ...
0
votes
1answer
62 views

Find all roots of a system of non-linear equations [closed]

Suppose I have a list of non-linear equations, and FindRoot returns different answers depending on where I start. I'm new to Mathematica. What is the best practice in mathematica for establishing all ...
4
votes
0answers
41 views

How to solve character encoding issue with Emacs, mathematica.el, and Mathematica 10?

I am successfully using mathematica.el in Emacs with Mathematica 10. However, I have some kind of issue with character encoding whereby when I call mathematica-execute on a Mathematica expression the ...
1
vote
1answer
33 views

Specify format to NotebookSave

When I save a Mathematica notebook using the front-end Save dialog, I can specify the format: However, the documentation for the NotebookSave command indicates ...

15 30 50 per page