# All Questions

111 views

### How to parse a .css file generated by Mathematica? modify values, add some values

How to parse a .css file generated by Mathematica (Export notebook to HTML)? modify values, add some values. convert into a expression? Are there some instances? I've wrote a simple function to ...
590 views

### Finding a 3d curve from torsion and curvature with NDSolve

I'm trying to use the Frenet–Serret formulas to find the curve that matches the torsion and curvature I specify numerically with an InterpolatingFunction. The ...
131 views

As part of a larger program, I need to solve $A x^2+B x+C \equiv 0 \mod p^k$ for prime $p$. Right now I'm doing this by calling ...
85 views

### Subgraph, HighlightGraph not acting as expected

I'm trying to create a simple graph from a matrix and then highlight a particular subgraph. My code (simplified from a bigger task) is as follows. I keep getting the "Subgraph::graph: A graph object ...
450 views

### Elegant high precision log1p?

Sometimes it is hard to understand how numerical expressions are evaluated. I remember reading claims by Wolfram on how smart the Kernel is to evaluate expressions trees numerically by recognizing ...
398 views

### How to generate the truth table to prove logical equivalence?

How to generate the truth table to show that $p \implies (q \vee r)$ is equivalent to $(p \wedge \neg q ) \implies r$ ? Can I use BooleanTable?
164 views

### Alternate method of conjugation using replaceall

Mathematica really struggles to simplify complex conjugates of complicated expressions - even given assumptions for every symbol in the expression being real. Often times I've found that I can ...
126 views

### Module that finds the sum of digits of any given positive integer

How can I make a module that finds the sum of digits of any given positive integer? I use this command F[x_]:= Apply[ Plus, IntegerDigits[x] ] Is there another ...
656 views

### Elegantly split a matrix into positive and negative parts?

I have a matrix $M$ of real components, and I want to split it into two matrices $M^+$ and $M^-$ of the same dimensions as $M$, where $M^+$ contains the positive components of $M$ (the remaining ...
180 views

### No response from DSolve

Using optimal control theory, I am trying to find the optimal paths of d and k such that they will maximize profit as given by lc: ...
144 views

### Failure of CountryData due to connectivity?

Today I started researching the "Four colours theorem" and to do so I need data, regions for example. I tried using the following line: ...
62 views

### Define new 3D graphics primitives in Mathematica 9 [duplicate]

I have generated a three-dimensional probability distribution function (PDF) and I would like to place a series of these PDFs at certain coordinates on a cuboid. I've rasterized the PDF so it is a 3D ...
777 views

### Calculate mean square displacements for different particles from a excel file

I have the particle movement data in the following format: ...
132 views

### Disable rounding up of PolarAxesOrigin

How to disable rounding up the radius which is used to calculate the origin of the polar axes with the option PolarAxesOrigin? Example: ...
104 views

### Is it possible to create a output cell without generating a cell tag from the input cell

I give a CellTag to my Input Cell, but the output cell would also inherit the CellTag. Is it possible to control not inherit the CellTag? Sometimes I need the output cell with the CellTag, but ...
189 views

### Perform FindRoots on Function Evaluation Containing RootSearch

I am using Ted Ersek's RootSearch function in Mathematica 9.0 (http://library.wolfram.com/infocenter/Demos/4482/) to create a function that I am using for graphing. ...
115 views

### Transform list of inequalities into matrix form $A\ x \leq b$

I have a list of linear inequalities, and I want to get it into the form $A\ x \leq b$; i.e., find the matrix $A$ and the vector $b$. Is there any function in Mathematica that can that can do this?
157 views

### How to use ParametricPlot Wih Conditions (or similar)

I´m analizyng the game "Battle of the Buddies" similar to "Prisioner´s Dilenma" All works fine, BUT... I want to draw in red the point whose coordinates are less than the coords of a strategy. ...
150 views

### How to do subtraction with sets in which the elements have multiplicity indicators? [duplicate]

I want to do subtraction with sets l1 and l2, which contain multiplicity indicators. For example, ...
365 views

### Extracting coefficients from g=a*x+b*y+c*x*y

I have a Response Surface Equation (RSE) that I'm trying to extract coefficients from. It has a form similar to: g = a*x + b*y + c*x*y; I want to be able to ...
203 views

### Table iteration over two ranges

I am trying to create a Table where the iterator has two ranges with different iteration steps. Let's consider a simple example: I want to find the square of the ...
35 views

### The value of PageWidth doesn't work for saving as HTML?

CellPrint@Cell["Test","Text",PageWidth->300,Background->Red] And I got this snippet of HTML code： ...
277 views

### How to add the pause button to that dynamic stopwatch?

Referring to How to make a dynamic stopwatch? Timers can now be created with timer = makeTimer[] and utilised with actions such as ...
230 views

### Return “true” if point is in Convex Hull [duplicate]

I have a set of points Z: Z = {{x1,y1},{x2,y2},..,} I would like to obtain a function that returns ...
43 views

Is there any way to find distinct prime factors for very large numbers using Prime and/or PrimePi that exceeds the ...
124 views

### Keep data in memory inside a notebook without having to evaluate it again [duplicate]

I have a notebook that calculates some data in a relatively large time so I want to keep these data saved inside the notebook without recalculate them every time I open the notebook. I know I can ...
199 views

### Determinant of a random matrix consisting of integers

I am trying to implement a function that finds the determinant of a random matrix consisting of integers. This is the code I have written so far, but I am stuck. Suggestions ? I want to find a ...
194 views

### Flipping x-tick-labels on custom plot

I'm slightly new to the world of Mathematica, so I can't assess the difficulty of my request, but anyhow, this is my question: I have 2 datasets that I want to plot with two y axes, and a reversed x ...
147 views

### Do a gauge transformation for a Chern-Simons theory?

Suppose we have the following Lagrangian density:  L=\epsilon^{\mu\nu\rho}\big(\sum_a A^a_{\mu}(x) \partial_\nu A^a_{\rho}(x)-\sum_{a,b,c}\frac{1}{3} f^{bca} A^a_{\mu}(x) A^b_{\nu}(x) ...
164 views

How do I get Mathematica to produce TeX output that does not omit the multiplication signs ? For example, this expression: ...
55 views

### Numeric output formats

I want to print the expression $A[x] = 8020.6596 \times 1.055^x$ as is on a 2D graphic. I included the line ...
161 views

### How to avoid CopyTensor in CompiledFunctions?

In a reply here Leonid wrote, “Compile can handle a number of higher-level functions, such as Transpose, Partition, Map, MapThread, etc. Most of these functions return expressions, and even though ...
86 views

### Preventing evaluation until all undefined symbols are resolved

FixedPoint[If[# <= 0, 0, # - 1]&, 2 x] Causes an infinite loop because of 'x'. How do i automatically prevent evaluation until ...
252 views

### Part::pspec error returned when using a ListLinePlot ColorFunction variable as list index

In ListLinePlot, I'm attempting to construct my own ColorFunction for coloring points differently based on a third dimension of data not plotted to a specific axis. However, ColorFunction only uses ...
134 views

### Limit won't compute

Does anyone know why the limit: ...
91 views

### How can a function with an embedded function be compiled?

Compile fun continues today, and I'm trying to get the function below to compile. First the function: ...
85 views

### PrimeNu counting function

Building on this question, what is the most efficient counting function for distinct prime factors? It would obviously be more efficient if Prime and ...
318 views

### Maple like collect command in Mathematica

In Maple I often simplify expressions for functions of same argument using the collect command: > collect(a*f(x)+f(y)+x*f(x), f, factor) (a+x)*f(x)+f(y) where ...