# All Questions

37 views

### How to assign a list of subsript?

I want to assign Subscript[C,i] by mapping a specific list. For example, the list is {1,2,3,4}, and I want to assign 1 to C1, 2 to C2, 3 to C3 and 4 to C4. How should I do? Many thanks:)
461 views

### Are greek symbols causing different evaluation?

I've updated today to Mathematica 9.0.1.0 from version 8 and found something that absolutely confuses me. Let us define a piecewise function: ...
91 views

### Getting error FullSimplify::infd: … simplified to ComplexInfinity

I tried to run the following code: ...
121 views

### Equation Simplification in Mathematica

I wonder if the following equation could be further simplified by Mathematica. There are $22$ Integrals involved and many of them are in the range $y_l$ and $y_u$. I would guess that at least those ...
344 views

### Replacing parts of a held expression with held parts of another expression

I'm applying the Trott-Strzebonski technique in order to replace inside a held expression. ...
281 views

### Finding the optimal teams ranking based on the table of match results

My original question was this: So my task is to score all the possible rankings of the 14 SEC football teams and find the best one, using who won in head-to-head games as the sole criterion ...
609 views

### How to make a function with its own options as well as passing options to other functions [duplicate]

I have a function with many of its own options, but I would also like to pass options to subfunctions using the FilterRules function. Here's a simple example: ...
302 views

### Mathematica 9, Mavericks, Java

I've been trying to get a clear story regarding the interaction of these three components before upgrading my system from Lion to Mavericks --- I can't afford a Mathematica disaster. What I think is ...
92 views

### Using imported data in further calculations

I have quite a lot of data in an Excel file, which I have to use in further calculations. The transformation should map a data point with thre coordinates into a two coordinate result. Example: ...
413 views

### Draw grid with points

How would I draw a grid with dots on specified intersections? The image below shows the basic idea: If I wanted to label the grid lines with index numbers or letters, how would I do that?
56 views

### Block, With, Module, can anyone help me understand the distinction? [duplicate]

I've been working heavily with Block[] for months in my research so I've read the documentation for the seemingly similar commands With[], Block[], and Module[]. Personally, I've had by far the ...
710 views

### How to expand the size of the matrix automatically?

I have a matrix in 2x2 a ={{x, y}, {z, u}} I want to expand this matrix 3x3 b ={{x, y, y}, {z, u, x}, {z, x, u}} 4x4 ...
44 views

### Cell seems to be evaluating in exponential time even though it shouldn't

I am trying to implement Newton's method for a given function f[x] and a starting x-value xval. The code should print out each new x-value as it approaches one of the zeroes of the functions. g[x] is ...
711 views

### How to calculate the position of a figure in an image?

My question is about recognising soccer players in the pitch. Thanks to Bill S who wrote an excellent script to recognise parts of the players. I found this issue after testing his solution. I will ...
78 views

### With command does not behave as expected according to its Attributes

The attributes of the With command are HoldAll which means it should not evaluate its arguments before its starts its business. ...
211 views

### Clustering of 2D map, based on similarity in spectra

I have experimental 2D-spectroscopy data, in a format similar to this: ...
466 views

### Series coefficients for an infinite sum?

I'm working through Carl Bender's Mathematical Physics lectures on YouTube (which are great fun), and I'd like Mathematica's help solving terms in the perturbation series. It would be convenient if ...
136 views

### 2 Equations continuous at a point

I want to get continuous point between two equations. My equations are: ...
75 views

### How to find all subsets which the total of elements is the same?

I want to find all subsets which the total of elements is the same. For example, Subsets[Range[30], {5}] means all 5-element subsets and the range of each element ...
471 views

### Parallel optimization of Markov Chain Monte Carlo

I'm trying to reduce the computation time of a MCMC simulation. Essentially I have a set of particles performing a random walk in a periodic random potential. The particles are independent and every ...
160 views

### Problems with importing a .txt file

I have some problems with importing a .txt file as a table. This is the file. I tried importing it with data = Import["data.txt", "Data"] I want to access ...
285 views

### Internal Shooting Method of NDSolve in combination with NDSolve`Reinitialize?

To explain my problem, I am trying to extend the BVP problem example from the help that illustrates how to use the shooting method of NDSolve: ...
104 views

### Define shifted pdf

I defined a PDF called dist, for example like this one: ...
87 views

### How do I get the heading elements from the TableForm option TableHeadings?

The following, table = TableForm[ConstantArray[0, {3, 3}], TableAlignments -> Right, TableHeadings -> {None, {"One", "Two", "Three"}}] generates ...
192 views

### Calculate expected value of custom pdf

I've a custom pdf in the sense that it's the convolution of several other PDFs p[t_] := Convolve[p1[x],p2[x],x,t]; Now I want to calculate the expected value of ...
128 views

### How do I get the length of held list without evaluating the list?

I used Extract with Hold to retrieve a sublist containing expressions I didn't want evaluating, e.g. ...
132 views

### Is there a package or canonical way for writing test harnesses in Mathematica?

I've written a complicated function foo.1 I'd now like to simplify this function's code, and later enhance it with more features. With each change, however, I'd ...
532 views

### Finding a number which has the same remainder when dividing certain other numbers

I am having some trouble with formulating my problem in Mathematica for this question: Is there a number greater than 1 which leaves the same remainder when it divides into 1716, 2154, and 4271? ...
130 views

### Visualizing how the zeros for this function change as its input parameter changes?

I'm trying to explore how the zeros of a certain parameterized function change as its parameter changes. ...
1k views

### Plot Matlab icon

I started to explore this on a whim and hasn't succeeded yet… Some introduction for the icon is found here but I can't understand it very well. (I admit that, though playing with ...
108 views

### Cannot Plot Function

I cannot plot this function as I am getting errors. I am not sure what I am doing wrong. Seems to work when $$n \rightarrow 1,$$ but when $$n \rightarrow 2,$$ I get a whole bunch of errors and ...
76 views

### Log of a Quaternion

My mathematica Input[In] code: ***q = Quaternion[0.1, 0.2, 0.3, 0.4] t=Log[q] QuaternionQ[t]*** Resepective results[Out] from Mathematica 9.0: ...
156 views

### CoordinateTransformData that works for any dimension

The function CoordinateTransformData in Mathematica only works for three dimension. For example, ...
287 views

### Numerical Optimization Methods

I am curious if any one has comments on "specific characteristics" of a problem that will deem it to be best solved by a specific optimization method such as ...
225 views

### NMinimize go out of bounds on some linear constraints

I'm trying to minimize a non-linear function of four variables with some linear constraints. NMinimize on Mathematica 8 seems to go out of bounds on some constraints giving complex values of the ...
127 views

### Poor performance when evaluating double integral of hat functions

I am trying to evaluate a double integral but am having performance issues. First a bit of math I am using a Galerkin like scheme to discretize operators in an equation I am working with. The ...
100 views

### Bug with LinearProgramming on Integers?

With Mathematica 7: LinearProgramming[{1, 1}, {{0, 0}, {1, 1}}, {1, 1}, Automatic, Integers] gives wrong result {0,1}. But ...
137 views

### Represent more nested dataset with the same color in the PieChart

I have multiple dataset that I want to plot in PieChart, as in PieChart[{{2, 2}, {1, 2, 4}}, ChartLayout -> "Stacked"] Now here is the catch: I want the color ...
189 views

### Extra brackets of Position command

Command Position always comes with two extra curly brackets {{}} when it's just one index for the location. I use [[1,1]] in front of my position commands. Is there ...
456 views

### How to resolve the duplicate error during interpolation

I have few hundred data points corresponding to an irregular shape closed curve. As the result I have data points that have the same value of y but different values of x. I want to create an ...
536 views

### NMinimize to optimize function Module

I am using Nminimize for simulation based optimization. I define the objective function (simulation with a variable "a") as a module to be used in the minimization. ...
391 views

### Errors when plotting Exp[-x]/x for large values of x [duplicate]

I am trying to plot a very simple function f[x_]:=Exp[-x]/x on a log-log scale like this LogLogPlot[f[x], {x, 10^(-5), 10^7}] ...
289 views

### choosing the fastest way of finding position

I have this list {1,7,8,10} for instance. and a second list which is always smaller or equal to the first one say {10,7}. How ...
140 views

### Setting plot size within vector; dynamic slider (two part question)

I have a question about the size of a plot in mathematica. I'm working on some differential equations (a simplified model of heat transfer in a building). I've programmed it so that you can set ...
145 views

### A list containing zero elements

I have a list containing zero and nonzero elements. How can I throw away zero elements and just keep non zero ones.
77 views

### Finding series expansion in parametric setting

Suppose $y=f(x;p_1,p_2,...)$ and $t=g(x;p_1,p_2,...)$ are given where $p_1,p_2,...$ are some parameters. We want to find a series expansion of $y$ in terms of $t$. Is there a direct command or ...
132 views

### Minimizing the maximal residual in mathematica

With this: d1 = 10; d2 = 4; mat = RandomReal[{-1, 1}, {d1, d2}]; vec = RandomReal[{-1, 1}, d1]; LeastSquares[mat, vec] ...
44 views

### SQLDateTime from a time column is missing the milliseconds component

Can anyone confirm this? I am using M9.0.1 on win7 64bit connecting to a SQL Server db. When I fetch a datetime column the SQLDateTime objects contain 6 entries, 5 integers and a fractional second ...
I have an array $v_{ijk}$ which is effectively a rank-$3$ tensor with dimensions $3\times3\times3$, and I need to contract it with $e^{ijk}$, i.e. evaluate $v_{ijk} e^{ijk}$ (see Einstein ...