# All Questions

295 views

### Find a word's linguistic pronunciation

Is there a way to get a word's linguistic pronunciation given the word as a string? I would like a function LingusticPronunciation such that, for example, ...
171 views

### Maximize over permutations

I have a set $S=\{s_1,\ldots,s_k\}$ and would like to maximize a fixed expression over permutations of $S$: $\max f(x_1,\ldots,x_k)$ with $x_i\in S$ and $x_i=x_j\Rightarrow i=j$. Is there a ...
225 views

### Can I ask Mathematica to replace the arguments of my functions with a replacement rule?

I have an equation that I evaluate at some point (let's say $x=1$) that have terms of the form f[1,y] D[g[1,y],{y,2}] Is there an easy way to replace [1,y] by ...
281 views

### Searching linked lists that contain lists?

Following the advice I've read here and other sites, I've been trying to use the Mathematica equivalent of a linked lists... ...
707 views

### Equation with complex numbers and 2 variables

I have an equation: eq = 1 + ( 9 / ( s*(s + 9) ) )*( k/(s + b) ) == 0; where s == -2 + 2I (...
193 views

### Page breaks within input cells

I am trying to print a notebook that begins with a lengthy piece of code that takes up almost an entire page. Because of my heading, it doesn't quite fit on Page 1, so Mathematica inserts a line break ...
77 views

### Log is not being evaluated inside Grid [closed]

My command is: Grid[{{N, logN!, N log N - N}, {10, Log[10!], 10 Log[10] - 10}}, Frame -> All] In the second row of the grid, the function ...
200 views

### How to join held Lists?

Let's say I have a = Hold@{2+2} b = Hold@{4+4} How can I get Hold@{2+2,4+4} ie join the two held lists ? More ...
636 views

I want to compute a 3D gradient vector field of an Image3D object using the built-in GradientOrientationFilter function in Mathematica. From the documentation I ...
948 views

### How to enter an equation into FindFit?

I have the equation ...
316 views

### How could I use Mathematica to remove finger tips that appear in images?

I used my photo camera to "scan" a heavy dictionary. I tried to have flat images by pressing the margins of the pages with my fingers. The color of the background is (normally) black and my fingers ...
121 views

I am trying to simplify some expressions using assumptions and got an inconsistent behavior of Mathematica 9 when working with indexed variables. Consider ...
109 views

### Use of StringExpression as argument

Is it possible to use a StringExpression as a pattern for an argument? I.E. something like foo[chars__~~ WordCharacter.. ~~ num:NumberString] := {chars, num}; At ...
121 views

### Strings and Formatting

There is something about strings which doesn't seem to be totally clear for me (for the moment): When entering "a string", the output, formatted as "Output" gives this string without the quotes. But ...
51 views

### Label cell goes away with SelectionEvaluate

When a given cell has a label (given with the CellLabel->"label" option of the cell), then this label disappears after calling SelectionEvaluate[ nb ] when the ...
127 views

### Why LinearModelFit is slower than NonlinearModelFit?

Why LinearModelFit is slower than NonlinearModelFit? ...
202 views

### Solving stochastic master equation

Can someone help please me in solving the following stochastic master equation for the density matrix $\rho$? where $\rho$ is the density matrix, $\sigma_i$ are the pauli matrices, $dt$ is the ...
272 views

### How to find monotonically increasing intervals of a function

I tried this code, but not working Clear[f]; f[x_] := x^3 - 3 x + 2; ForAll[{x1, x2}, x1 < x2, f[x1] < f[x2]] Reduce[%, {x1, x2}, Reals] I expected the ...
184 views

### How to reduce the number of operations needed to evaluate an expression? [duplicate]

For some numerical calculations in C++ I have, for example, this complicated expression to evaluate. Given as Mathematica input, in its original form it is ...
287 views

### ListPlot with PlotRange -> Automatic giving unexpected results in V.9

There seem to be a problem with ListPlot auto ranging in Mathematica 9. Here's my code: ...
270 views

### Add blank line before end of file with export

I have a list of points (e.g. {1.2,0.4}) which I export to a file using ...
113 views

### ParallelTable of ParametricNDSolve objects fail

There seems to be a problem with ParametricNDSolveValue togeteher with ParallelTable First we create a ParametricNDSolveValue object ...
90 views

### how to extract a subinterval from a previous element in a list (in condition) [closed]

question: i need to use mathematica to write an intermediate value theorem's algorithm, but i don't know how to write in a module form... i have a function and then, we need to set up a range and ...
136 views

### ParametricNDSolve: Fails to differentiate an matrix differential equation

It seems like there is a problem with differentiating a ParametricNDSolve object when the underlying system contains an matrix differential equation. Create a simple ParametricNDSolveValue object ...
416 views

### Sum[expr,{i,0,Infinity}] for power series of cumulative normal distribution gives exponential function?

The Taylor series (about 0) for the cumulative normal distribution has coefficients: ...
2k views

### Labeling points of intersection between plots

There are several answers where Mathematica used mesh points to show graphically where curve intersections exist. For example: Marking points of intersection between two curves or Is there a better ...
107 views

### How to copy groups of cells with NotebookWrite?

I'm trying to use: NotebookWrite[nb, NotebookRead[EvaluationNotebook[]]; to copy cells from the EvaluationNotebook[] to a new ...
137 views

### Import audio in uLaw format?

How do I import a uLaw-format audio file into Mathematica? Here's an example: hello-world.ulaw For reference, here's the same file in wav format: hello-world.wav As I understand it, the uLaw ...
132 views

### Show Simplified Directives [closed]

Is there a way to force Mathematica to convert an already rendered Graphic to the simplified Directive form of that Graphic. Background: I am currently editing Graphics using Drawing Tools and then ...
167 views

### Protecting function definitions only for particular inputs

I would like to be able to define the values of a particular function for new inputs. f[x1]=f1; f[x2]=f2; I would also like to be able redefine the values for ...
102 views

### How to suppress automatically generated header in packages?

At the top of the .m file which is automatically generated from initialization cells in a notebook there appears a header: ...
965 views

### Convolution of two distribution functions

I have two functions; f[x_] = (1/k) Exp[-x/k] ; g[x_] = (1/p) Exp[-x/p] ; How I can convolve them? In Mathematica for convolving two functions we have this ...
177 views

### OpenSQLConnection problem - password visible

Prerequisites some database (here, it's called sakila (mysql standard test db I think)) a user (with password) that has access to that db (I'll use u:testuser/p:testpass) Setup - minimal (?) ...
225 views

...
295 views

### How can I find English words among the names of the characters in the Mathematica character set?

I want to find some single meaningful words in the "ASCII/Unicode" form characters. For example, I want to get alpha from ...
68 views

### Error with String patterns producing Removed[“Failure”]

While working on How to capitalize the first letter of each word in a string and trying to understand why certain characters were not considered letters I tried this: ...
473 views

### How to capitalize the first letter of each word in a string

The following examples only work for the first character of the whole string, but not of words. ...
243 views

### Apply a function to a matrix of vectors [closed]

I have a matrix containing on each position a pair of numbers $(a,b)$. I would like to compute the norm of each vector $(a,b)$ and keep the result in form of a matrix. So basically, I need to apply ...
184 views

### Can't simplify Abs[a*Cos[x]]^2

Why doesn't FullSimplify[ Abs[a*Cos[x]]^2, Assumptions -> {{a, x} ∈ Reals}] simplify to (a*Cos[x])^2 but this query ...
166 views

### NDSolve: Reinitialize fails with If condition

I have found a weird problem using If conditions containing an state inequality of the form state<=. First consider the simple ODE with an If condition ...
254 views

### Possible bug with second argument of Dynamic

According to the documentation, Dynamic Details & Options section, especially: For interactive mouse operations Dynamic[expr,{f_start, f, f_end}] typically ...
649 views

### How can I convert colors to grayscale?

I want to change the above colored plot into a grayscale plot. I have tried this: CCGray[pic_?ImageQ] := Module[{}, ColorConvert[pic, "GrayScale"]]; but it ...
100 views

### Parallelize matrix operations

I'm trying to reduce to a minimum the time of some matrix operations. When I don't parallelize and write the code in the most compact form I get the operation done in around 1sec (is this good? the ...
92 views

### How to add a condition to a formula so that it will not appear at the result? [duplicate]

Sometimes I have very long and complicated equations, when I evaulate the equations for example taking derivative or integral there will be several conditions with the answer. My question is that; is ...
1k views

### Measuring execution time of code

How one can measure the execution time (time that is spent for code to finish) of a program in Mathematica? I understand that there are general timing functions (Timing, AbsoluteTiming, TimeUsed, ...
174 views

### Controlling page breaks

I'm writing a bunch of cells to a new notebook nb and am trying to control the pagebreaks. That is, I want a pagebreak after each Length[listOef] number of cells. ...
94 views

### Locator with Integer value coordinates [closed]

I want to get the Pixel value of an image.and here is my code ...
522 views

### Relational joining of tables

A common thing to want to do with data is to combine it (at least I thought this was a common thing). In SQL there is the idea of table joins "select id,v1,v2 from A,B where A.id=B.id" kind of thing. ...