# All Questions

198 views

### How to use If to select arguments min & max in Range?

I want to call Range[] with its arguments depending on a condition. Say we have ...
89 views

### Speed improvement in string distance function

I'm using this distance function to compare distance between strings: ...
146 views

### Create a new window from CDF, such that it contains a Manipulate. Force this Manipulate work.

I have a notebook with such a button creating code: ...
480 views

### Volume of a graph

I have the following list: ...
129 views

### Running unit tests while debug session is running in Workbench

Is it possible to run unit test while a debug session is already open in Wolfram Workbench 2.0? A typical use case follows: I have a debug in Workbench session open. I evaluate some cells in a ...
744 views

### Checking for duplicates in sublists

I have a list with contains entries that are length 8 sublists,i.e. L1={{a1,b1,c1,d1,A1,B1,C1,D1},{a2,b2,c2,d2,A2,B2,C2,D2},...} and so on. Now, in my problem two ...
179 views

### Having Mathematica solve or help solve a set of 8 equations

There is a set of DDE's that arise in leukemia dynamics and I'd like to find the equilibrium points of the system by setting all of the derivatives equal to zero. The system can be described in ...
591 views

### Using SimMetrics Java Function on Mathematica

I would like to know if it's possible to use/install this java library on Mathematica. This library, named SimMetrics, has a lot of string similarity functions that I would like to test. Here is the ...
304 views

### How do I use Mathematica as a vector drawing program?

Recently I changed my furniture in my room and I am trying to find the best position of each part. I am sure that Mathematica could help! I read the LocatorPane, selecting multiple Locators for ...
172 views

### Change the colour of a ListPlot element in each iteration of Manipulate

I would like to modify the colour of dots in a ListPlot[Table[function]], e.g ...
393 views

### Efficiently generating histograms with large numbers of bins

I'm trying to generate a histogram for a large data set with the following lines of code: ...
213 views

### Custom Matrix product

I have a list: list1 = {{{a1, a2, a3}, {b1, b2, b3}}, {{c1, c2, c3}, {d1, d2, d3}}}; I want an operation that gives me: Is there a built-in way of doing ...
159 views

### Inverse function

What probably could be the inverse of following function? ...
135 views

### Input alias having a place holder which gets selected when the alias is used

If one executes the following code ...
446 views

### How can I solve a set of non-linear equations?

I was wondering whether someone can give me an idea on how I can solve a set of non-linear equations with an unknown exponent This is what I have: Known values: N, R Unknown values: λ, α, J ...
152 views

...
586 views

### Problem in solving PDE

I have a problem in solving a type of PDE. The actual problem involves diffusion and adsorption in a trench, but here is a simpler example. I have two independent variables $t$ and $x$. There are two ...
338 views

### How can I log in to my Wikipedia account and access my watch list?

Wikipedia's "Edit Watchlist" page (for logged in users) has a list of hyperlinks to the user's watchlist (here is an example from my account). I've tried to use ...
151 views

### Change the behaviour of a LocatorPane

Normally, LocatorPane detects any single click as in the following example: ...
172 views

### Are there functions or packages in Mathematica to sort subsets in lex order, colex, revlex, etc.?

I am looking for non-canonical sorts of lists. A function that would give: Sort[X, "order type"] With "order type" being colex, revlex, etc.
265 views

### Drawing CountryData groups

I'm sure I'm overlooking something obvious, but I can't draw groups of countries. Here are two countries and two country groups: ...
800 views

### Simplifying a trigonometric expression

I'm sure this has been addressed before, but I can't find it! I want Mathematica to simplify Sqrt[1 - Sin[π/6 - θ]^2] to ...
425 views

### Determinant of a large matrix and solution of a linear equation

I am trying to solve a linear equation in x, where the equation is given by Det[M]==0. The M is a symmetric matrix (dimensions 47x47) with an element equal to x and all other elements are equal to ...
316 views

### How can I reorder the factors in the terms of a polynomial?

How can I reorder the factors in the terms of a polynomial? Consider ...
95 views

### Can we ask ComponentMeasurements to use NonLinearModelFit to return a covariance matrix for underlying intensity data?

I'd like to be able to calculate a covariance matrix for some data underlying a morphological component. Provided this data, I can write something like: ...
197 views

### Asking Mathematica to produce a function of some variables

Given $$l_0=\sqrt{\frac{\lambda_1(\lambda_0+\mu_0)}{\lambda_0(\lambda_1+\mu_1-1)}}$$ and $$l_1=\sqrt{\frac{\lambda_0(\lambda_1+\mu_1)}{\lambda_1(\lambda_0+\mu_0-1)}}$$ ...
155 views

### Replace function call with expression resulting from the symbolic evaluation of the function when defining a second function?

Suppose the evaluation of a function f[x_, y_] := ... takes a very long time, but the output is a not-so-complicated polynomial in ...
117 views

### Tooltips with Popupmenus, can't supress the popups prior to clicking

I'm trying to add popupwindows to tooltips for points on an ErrorListPLot but all the popupwindows appear on screen immediately when I run the command below that plots the graph. After closing all ...
225 views

### Is the formula $\sum _{m=1}^{n-1} \prod _{k=m+1}^n x_k x_m$ wrong in the wiki's page

SymmetricPolynomial[2, {Subscript[x, 1], Subscript[x, 2], Subscript[x, 3], Subscript[x, 4]}] \begin{align*}x_1 x_2+x_3 x_2+x_4 x_2+x_1 x_3+x_1 x_4+x_3 ...
285 views

### converting between forms - symbols/subscripts - matrix products

If I have a vector of the form (xp+y, x+yp) do you have a simple way of creating the following matrix and vector from it: {{p, 1}, {1, p}} * {x, y}, such that ...
150 views

### Looking for feedback on this function

I'm not sure this is an appropriate question; if not, I'm sure someone will close it :) I've got the following function, listed below; its job is to accept a graph (function) presented either as a ...
1k views

### Automatic e-mail/text message when a calculation has finished?

Sometimes Mathematica takes quite a while to finish calculations and it would be convenient to be able to move away from the computer while it is working. I was wondering if there is any "clever" hack ...
552 views

### Manipulate showing the trajectory of a particle along a parametric curve

I have a particle which follows a certain trajectory given by rx and ry ...
404 views

### Extracting matrix rows when one of its elements is part of a list (without a loop)

I have a matrix whose rows I want to extract based on whether the elements of one of its columns is a member of another vector (calling it the "comparison vector"). I would like to get better at ...
188 views

### Pattern matching on Orderless functions inside Hold

MatchQ[Hold[1 + 2], Hold[2 + 1]] returns False. But in the presence of a Blank[] in the ...
210 views

My code is ...
130 views

### StringCases functionality

I have a list of strings in where each element of the list is in this form: ...
376 views

### How can I define a sequence of functions?

I need to define a function fun, and then re-define this function iteratively. The code is given at the end. First, a function ...
186 views

### How to ignore list elements when extracting with pattern matching

If I have a simple list, say {1, 2, 3}, and I want to extract a subset of the elements, what is the correct syntax? e.g. { i, _, j } = {1, 2, 3} I want i = 1 ...
4k views

### What are the advantages of using .nb rather than .m files?

I can edit a notebook within the mathematica front end and then Save As a .m file, which produces output like this: ...
168 views

### How to write an import converter that can import split and compressed files

First of all sorry if this question isn't formatted properly. I'm working with a data format that prescribes separate header and data files, so for instance ...
161 views

### How to fit a one-dimensional dataset with respect to several bounded parameters?

I have this set of data ...
64 views

### Defining functions in a loop [duplicate]

I have a symbolic solution to a linear system with respect to some variables a[i,j] which depend on a parameter t. sol=Solve[...,Table[a[i,j],{i,0,n},{j,0,n}]] I ...
178 views

### How to format usage messages such that function templates are parsed correctly?

Is it possible to format usage messages (with italic arguments etc) such that Mathematica 9 still parses function templates correctly? For example, plain usage messages work when pressing ...
106 views

### Why don't rules applied inside ContourPlot3D work?

The output of the following code is the same as the input. ...
95 views

### Cases Message Valid Notebook Structure

Note: Spelunking will likely be needed. Execute the following. You should get back and error along the lines of First::first:... This error is unimportant except ...
104 views

### How to add a label to a CopyEvaluate button?

I found a definition of a button Button[Defer[ Information[ \[SelectionPlaceholder], LongForm -> False]], None, BaseStyle -> "CopyEvaluate"] that is ...
177 views

### Positive integrand giving negative answer

I'm integrating a positive function f(t) times sin(t) from 0 to pi/5 and get -38. Actually f is slightly negative for a short time (smallest value ~ -0.0005), but far from enough to explain this. ...