All Questions

4
votes
4answers
373 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 ...
1
vote
1answer
136 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. ...
1
vote
1answer
155 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: ...
1
vote
1answer
249 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. ...
4
votes
1answer
348 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 ...
4
votes
1answer
74 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 ...
2
votes
4answers
203 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 ...
0
votes
1answer
264 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 ...
2
votes
1answer
117 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 ...
3
votes
3answers
375 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 ...
2
votes
1answer
372 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: ...
3
votes
1answer
139 views

LibraryLink Documentation

The documentation for LibraryLink has the following example ...
6
votes
1answer
153 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 ...
2
votes
0answers
77 views

Det and MatrixRank freezes on SparseArray with nonzero default value

Why does the following simple code never come to an end (at least with version 8) n = 5; mat = SparseArray[{i_, i_} -> 1, {n, n}, -1/(n - 1)]; MatrixRank[mat] ...
0
votes
2answers
110 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 ...
3
votes
0answers
238 views

Weird behaviour from ListSurfacePlot3D

Looking at Documentation for ListSurfacePlot3D, I follow the basic example presented there. ...
3
votes
2answers
108 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 ...
0
votes
3answers
352 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 ...
8
votes
5answers
333 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 ...
3
votes
1answer
72 views

Overscript distance

When I write: Overscript[PQ, \[RightVector]], the arrow is placed too close to the P and ...
1
vote
1answer
145 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 ...
5
votes
2answers
185 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: ...
8
votes
1answer
350 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: ...
6
votes
1answer
189 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 ...
0
votes
2answers
79 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: ...
3
votes
2answers
203 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 ...
3
votes
1answer
367 views

Tips for efficiently solving large system coupled (nonlinear) ODEs

I'm trying to solve a system of nonlinear, coupled ODEs, where the governing equation for the $n-th$ ODE is of the form: $\sum_k^M Q_{nk} \ddot{a}_k -\sum_{\ell}^M\sum_k^M S_n(\ell,k) \dot{a}_{\ell} ...
0
votes
1answer
183 views

Simplify function with normalized vector

I made a very simple case: testF[x_, y_, z_] = x^2 + y^2 + z^2 Simplify[testF[x, y, z]] If {x, y, z} is normalized, the simplified result should just be 1. How ...
2
votes
0answers
33 views

Plotting list-valued interpolating function [duplicate]

I have an interpolation function which returns a list, e.g.: f=Interpolation[{{1,{1,2,3}},{2,{4,5,6}}}]; When I try to plot it, I get single-colored curves. ...
5
votes
3answers
248 views
16
votes
1answer
301 views

How to strip all formatting from a string and convert it to plain text?

The documentation on String states: But if I try to perform some manipulations on this string, for example, take 2 words from the left, I get some shards of ...
2
votes
2answers
140 views

Conditioned Probability Task

I have this task with two questions I would like to compute in Mathematica. Suppose a pair of random variables $(X, Y)$ has a equal distribution on the following 7 points: $\begin{matrix} ...
3
votes
1answer
183 views

Converting this recursive function definition into nested sums?

Here's the recursive function I'm using: DH[n_, k_, s_] := Sum[Binomial[k, k - j] DH[n/m^j, k - j, m + 1], {m, s, n^(1/k)}, {j, 1, k}] DH[n_, 0, s_] := 1 Now, ...
-2
votes
1answer
375 views

Interpolating Function inside of NDSolve

I have a problem and it seems to be connected to an Interpolating function inside of an NDSolve command. The resistivity[x] ...
12
votes
0answers
852 views

Mathematica performance on Mac

I recently got a trial version of both Mathematica 9 and MATLAB 13a for Windows. I was stunned by the performance difference in the Windows and the Mac version. It was a simple test in matrix ...
2
votes
0answers
32 views

Detecting a more general pattern [duplicate]

I need a function that, given 2 patterns, determines if the first pattern is more general than the second (i.e. that any expression successfully matched by the second, will be successfully matched by ...
2
votes
3answers
189 views

Graph with $\{a,b\}$ as Vertex Instead of Number

I'm trying to create a graph which has $\{a,b\}$ as labels: ...
2
votes
2answers
178 views

While loop doing cell evaluation not completing

I am trying to get a loop structure using While to repeatedly evaluate another cell referred to in its body (using a cell tag). ...
9
votes
2answers
240 views

PlotRangeClipping not working correctly with small ImageSize and PDF-export

Although Mathematica has some nice plotting capabilities, there are some things which are annoying me: I like to export a Graphics oder Plot to PDF for use in $\LaTeX$. I like to a have an ImageSize ...
6
votes
3answers
464 views

Calculate probability function

I would like to calculate the following with Mathematica: Let $X$ be a random variable with probability function $$p(x)= \left\{ \begin{matrix} \frac{x}{6} & \text{for }x \in \{1,2,3\}\\ 0 ...
10
votes
4answers
2k views

How to convert rgb to YCbCr?

I looked at ColorConvert, but haven't found a relevant option. Is there a built-in function do this?
1
vote
1answer
93 views

Multi-table SQLSelects

I'm trying to figure out how these statements really work, and am having some trouble with the documentation (and the software!). Using the example publishers database (Mathematica 8), the following ...
3
votes
1answer
76 views

Web deployment of document containing URLSave function

Is it possible to deploy a Mathematica notebook which contains a dynamic URLSave function? My code has the following structure: ...
2
votes
1answer
260 views

Call Functions From File Without Modifying Context (Sandbox)

Let's say I have file named test.m containing test[arg1_] := ( Print[arg1];) What is the best technique for calling test like ...
2
votes
1answer
81 views

Having SetOptions[] affect CDF styling

Instead of writing a package and importing it, at the beginning of many of my .nb files I have a string of SetOptions commands which govern things like plot styling. However, when I subsequently make ...
10
votes
1answer
356 views

Predictive interface eats my Esc key

After updating to version 9, I found the predict interface very helpful except there is a small problem always annoying me: Consider this: I have a list ...
1
vote
3answers
2k views

Find dy/dx given an equation

Here's a homework problem from the Coursera course Calculus: Single Variable by Robert Ghrist Find the derivative $\frac{dy}{dx}$ from the equation $x \tan y - y^2 \ln x=4$ I wanted to check my ...
5
votes
1answer
170 views

How to trash files / directories?

Both DeleteFile and DeleteDirectory can only delete files / directories, and lack the option to move them to the trash. Is ...
9
votes
1answer
359 views

Drawing Zonotopes from Adjacency Matrix

This is crossposted in cs.stackexchange.com, but I have been trying to use Mathematica do this and figured it might be more appropriate to ask here. Define a "simple zonotope" to be a regular ...
0
votes
1answer
107 views

Computing a mean of median list of points

Given a array of lists with the same number of here N = 10 elements: ...

15 30 50 per page