# All Questions

172 views

### Convert probability example to a distribution

Consider a box which contains 30 balls. 10 red, 10 white and 10 blue balls. There will be picked 4 balls randomly, without putting the balls back to the experiment. My question is: How do I create a ...
1k views

### How to plot 2D plot against two functions [closed]

I need to Plot two functions one is on x-axis and second on y-axis, both function have common variable $x$. The two functions are ...
410 views

### How to open/close all collapsed/open cells?

Is there a way to open/close all collapsed/open cells? The reason is for a long notebook, it is convenient to see all the section and subsection headings at once.
469 views

### How Do I Plot Histograms and Binomial Distributions Side by Side?

Here is the code I thought might yield up two histograms and two binomial distributions plotted side by side: ...
189 views

...
340 views

### How do I find the best fit?

I am trying to solve following system of three differential equations ...
108 views

### Strange behavior of Mathematica regarding calculation time

Today I witnessed the following strange behavior of Mathematica, when it comes to calculation time involving larger nested lists. The following is the short example that I setup, I am sure one can ...
202 views

### Why doesn't the FileNameSetter button work in my DialogInput?

I am new to Mathematica, so it's probably a small error but I can't figure it out. Here is the code : ...
337 views

### Cropping an image to a minimum bounding box for a set of points

Imagine a define a pointlist inside of an image: Provided a pointlist for the set of red dots around the toy horse, is there a way for me to automatically crop to a minimum bounding box for this ...
76 views

### Why do two codes give different output?

I have tried the following to get the eigenvalues of several matrices of the type: ...
405 views

### Defining and isolating a region of an image internal to a bounding curve

I was recently looking over this very nice question by March Ho: Counting elements which are inside another element on a different colour channel There are often times where I find myself wanting to ...
473 views

### select subsets of elements of a list under a certain condition

I am new in Mathematica and am stuck on a simple problem. Please advise: I have the following list: list = { {"1", 1000}, {"2", 800}, {"3", 800} }; I want to ...
155 views

### List manipulation, replace a value [duplicate]

I have the following list: ...
2k views

### Axis/Angle from rotation matrix

With r=RotationMatrix[a,{x,y,z}] I can compute a 3D rotation matrix from axis/angle representation. Given a 3D rotation matrix ...
187 views

### Combination of a Contourplot and a Graphics Object

I want to combine the following to graphs. ...
463 views

### Color of a plane in Contourplot3D

I have the following code example: ...
267 views

### Compute Correlation between two binary variables

$X_1$ and $X_2$ are two binary stochastic variables with simultaneous probabilitydistribution:  \begin{matrix} &X_2=0&X_2=1\\ X_1=0&0.30&0.17\\ X_1=1&0.08&0.45 ...
487 views

### Listing matrices up to symmetry

I am interested in the equivalence relation on N x N binary matrices, in which two matrices are equivalent if one can be obtained by rotating/reflecting the other. I would like to obtain a list ...
145 views

### Value for x such that |(x-y)| is minimum

I have a list Y={y1,y2,y3,...,yn} And I would need to find x such that Abs[x-Y[[i]]] for all $y_i$ in $Y$ is minimum. ...
215 views

### Can I use SelectComponents with measurements that take into account the value of underlying pixels?

Normally, we can ask for the mean, median, etc. underlying pixel values for morphological components with the command: ...
286 views

### How can I solve my recursion equation?

How can I solve the recursion equation given below? I doubt there have no solution for the recursion equation because this is circulating recucrsion equation. ...
464 views

### Counting the number of operations performed during a calculation

I need to know how can I count the number of operations performed during a calculation of a CompoundExpression. In some of these expressions there are ...
77 views

### Constructing an Array from typed expression

I want to produce an array from expressions given by test[one][1] = 3; . . test[one][5] = 7; etc. Normally would use ...
253 views

### Removing coefficients and repeated elements

I got to a problem where as I just can't find the proper Mathematica command. I'm given a list, for example: $\{1,x1,-x1,x2,x5,x3,-x2,-x4\}$ I need this to become $\{1,x1,x2,x3,x4,x5\}$ The ...
392 views

### Pull Constants outside of integrals

I would like Mathematica to pull constants outside of an integral: e.g., $\int_0^t f[t] g[s] dt \to g[s] \int_0^t f[t] dt$ This has previously been discussed at replacement rule to pull independent ...
137 views

### Compact form for domain ranges of many variables

When one sets up an equation to solve one often needs to specify conditions on the variables such as { x>0 && y>0 && z>0 } This is not ...
542 views

### Constrain movement of a locator inside Manipulate

Once again a big thank you for the great help in my earlier post: Plotting function with Dynamic parameter. It totally worked out. I now have a new coding problem ...
507 views

### Crank-Nicolson with NDSolve?

As far as I understand, the Crank-Nicolson method (a.k.a. trapezoidal method) can be expressed as a second order implicit Runge-Kutta method. It's Butcher tableau is: ...
204 views

Bug fixed in version 10.0.0 The documentation for LibraryLink has the following example ...
191 views

### Trouble with links to symbol pages generated by Wolfram Workbench

I am having some troubles with documentation generated by wolfram workbench. When i try to open symbol page created with workbench by pressing F1 I get a search page instead of my symbol page. When I ...
97 views

### Det and MatrixRank freezes on SparseArray with nonzero default value

Bug introduced in 7.0 or earlier and fixed in 9.0.1 or earlier Why does the following simple code never come to an end (at least with version 8) ...
127 views

### Assigning several values inside DynamicModule

I have coded a model that contains several parameters. The parameters can be changed interactively by the user using an interface contained in a DynamicModule[]. There are several "basic states" of ...
301 views

### Weird behaviour from ListSurfacePlot3D

Looking at Documentation for ListSurfacePlot3D, I follow the basic example presented there. ...
128 views

### Zero order term in an exprerssion

I have a very long expression like a + b x/y + f + c y/x + d (x z)/y + ... where a , b, c, f ... are coefficients and ...
628 views

### Plotting function with Dynamic parameter

I'm trying to get this code working: a = 2; func[t_] := Dynamic[t + a]; Plot[func[t], {t, -5, 5}] The idea is: I'd like to have the dynamic parameter a change ...
420 views

### correct way to map a function on entries down the pages in a 3D matrix?

updated: added another method to the methods I tried below for completion. This is new way of doing it, but most likely not very efficient, did not time it I can only visualize 3D matrices in my ...
87 views

### Overscript distance

When I write: Overscript[PQ, \[RightVector]], the arrow is placed too close to the P and ...
213 views

### How can I use SelectComponents to select for components that have a pixel within a certain RGB range within their convex hull?

I calculate a set of morphological components: Components = MorphologicalComponents[Binarize[image,0.1]]; We can now use SelectComponents to filter for ...
235 views

### Can we compile using only Integers Of Unusual Size?

I coined Integers Of Unusual Size to mean "bignum" using GMP, the underpinning of Mathematica's ability to craft very big numbers. I have these functions from this question: ...
512 views

### Counting elements which are inside another element on a different colour channel

I have a 3-channel image which shows red and green points (certain labelled proteins) inside blue regions (cell nuclei). After applying some segmentation filters, the resulting image is as follows: ...
267 views

### Unable to save changes in Option Inspector from one session to another for the Documentation Center

I wanted to change the global option "WindowsSize" to the "large" value using the Option Inspector. It works well for the current session. But then I realize the "Apply" button was greyed and not ...
88 views

### Obtaining a particular form of solution for an integral

When I do: Integrate [E^(-(t/\[Tau])) Cos[\[Omega] t], {t, 0, \[Infinity]}] How could I get the solution in the form: ...
244 views

### How can I detect and modify one area of an image while preserving the rest

I have an image with a big black disk bounded by a white boundary in its center. The image contains some other stuff outside of the spot and its boundary. This stuff has colors which include both ...