20
votes
7answers
827 views

Make a huge vector in a wise way

I need to construct a vector similar to: v[x_]:={0, 0, x, 0, 0, 2*x, 0, 0, 3*x, ....., 0, 0, n*x}; where n=10^9. How can I ...
1
vote
1answer
53 views
0
votes
0answers
133 views

Some questions about Integral Equation

I am trying to solve the finite Hilbert transformation like the following form $ f(x)= \frac{1}{π} \int_{-1}^{1} \frac{g(y)}{(y-x)}dy $ the given function f(x)=1 and I want to solve the g(x) I know ...
25
votes
2answers
563 views

eigenvector bug?

Bug introduced in 7.0.1 or earlier and fixed in 10.0.0 I have a fairly simple $3\times3$ complex matrix, $$ M=\left( \begin{array}{ccc} \frac{7}{2}-\frac{i}{2} & -1+i & \frac{1}{2}+\frac{5 ...
2
votes
2answers
243 views

Writing a function that returns a (usable) function

I am trying to create a function that returns Arnold's Cat Map of size n iterated k times. I can get something out of the Function command, but I can't figure out ...
18
votes
1answer
384 views

Underlying Algorithms for List Manipulation Functions

Does anyone know, or know of a link for the underlying algorithms used for list manipulation functions? Specifically: Union with and without the ...
2
votes
1answer
243 views

How to select TransformationFunctions based on Assumptions made when using Simplify?

I am re-writing the question using a very simple example so not to confuse matters with the another question being asked where I used the example from there. In general, how to add logic to switch ...
2
votes
1answer
66 views

Followup question from "Temporarily redirect output of Print[ ] to a second file

I'm implementing the first answer to my earlier question about redirecting the output of Print[ ]. Opening a file with OpenWrite[] and assigning the stream to ...
4
votes
1answer
240 views

Can BoxWhiskerChart show both the median and outliers at the same time?

Is there an easy way to make BoxWhiskerChart show both the outliers and the median line? g1 below shows outliers but not the ...
2
votes
1answer
155 views

How to use TransformationFunctions on a compound expression?

I was trying to answer this question but having hard time with the correct way to write the transformation rule. Trying to write a rule to transform ...
3
votes
2answers
347 views

Replacing gamma at half integers by double factorial

It is well-known that for any positive integer $n$ the equality $\Gamma(n+\frac12)=\sqrt\pi\,(2n-1)!!/2^n$ holds, where $!!$ stands for the double factorial. I am using ...
5
votes
2answers
2k views

Command line execution of Mathematica notebooks and conversion to .m

Sometimes one may want to execute a notebook via the command line (for example to run it remotely). As far as I know it's not possible to run notebooks directly, but ...
1
vote
4answers
202 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 ...
2
votes
0answers
91 views

Speed improvement in string distance function

I'm using this distance function to compare distance between strings: ...
3
votes
2answers
154 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: ...
5
votes
2answers
503 views

Volume of a graph

I have the following list: ...
4
votes
1answer
133 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 ...
8
votes
3answers
778 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 ...
1
vote
0answers
180 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 ...
6
votes
1answer
695 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 ...
3
votes
2answers
315 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 ...
4
votes
4answers
182 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 ...
5
votes
1answer
416 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: ...
8
votes
6answers
218 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 ...
0
votes
2answers
167 views

Inverse function

What probably could be the inverse of following function? ...
4
votes
1answer
137 views
0
votes
1answer
466 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 ...
1
vote
1answer
671 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 ...
5
votes
1answer
367 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 ...
2
votes
1answer
158 views

Change the behaviour of a LocatorPane

Normally, LocatorPane detects any single click as in the following example: ...
5
votes
1answer
177 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.
5
votes
3answers
289 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: ...
4
votes
4answers
919 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 ...
2
votes
2answers
476 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 ...
2
votes
3answers
335 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 ...
1
vote
0answers
99 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: ...
4
votes
1answer
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)}}$$ ...
4
votes
2answers
157 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 ...
2
votes
1answer
118 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 ...
0
votes
1answer
228 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 ...
1
vote
4answers
308 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 ...
6
votes
2answers
164 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 ...
42
votes
4answers
2k 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 ...
1
vote
1answer
606 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 ...
5
votes
8answers
446 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 ...
10
votes
3answers
197 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 ...
7
votes
1answer
224 views

ListLinePlot not showing filling

My code is ...
-3
votes
2answers
132 views

StringCases functionality

I have a list of strings in where each element of the list is in this form: ...
7
votes
2answers
403 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 ...

15 30 50 per page