7
votes
1answer
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, ...
1
vote
1answer
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 ...
3
votes
2answers
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 ...
10
votes
4answers
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... ...
0
votes
1answer
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 (...
4
votes
1answer
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 ...
0
votes
1answer
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 ...
7
votes
6answers
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 ...
4
votes
0answers
636 views

computation of gradient vector field in 3D using GradientOrientationFilter

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 ...
3
votes
2answers
948 views

How to enter an equation into FindFit?

I have the equation ...
10
votes
2answers
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 ...
1
vote
1answer
121 views

Assumptions about list elements

I am trying to simplify some expressions using assumptions and got an inconsistent behavior of Mathematica 9 when working with indexed variables. Consider ...
3
votes
1answer
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 ...
2
votes
1answer
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 ...
2
votes
1answer
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 ...
6
votes
1answer
127 views

Why LinearModelFit is slower than NonlinearModelFit?

Why LinearModelFit is slower than NonlinearModelFit? ...
0
votes
0answers
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 ...
5
votes
2answers
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 ...
8
votes
2answers
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 ...
0
votes
1answer
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: ...
4
votes
2answers
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 ...
1
vote
1answer
113 views

ParallelTable of ParametricNDSolve objects fail

There seems to be a problem with ParametricNDSolveValue togeteher with ParallelTable First we create a ParametricNDSolveValue object ...
-1
votes
1answer
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 ...
1
vote
1answer
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 ...
1
vote
1answer
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: ...
8
votes
2answers
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 ...
4
votes
1answer
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 ...
4
votes
1answer
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 ...
1
vote
2answers
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 ...
8
votes
3answers
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 ...
6
votes
1answer
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: ...
3
votes
1answer
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 ...
8
votes
1answer
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 (?) ...
1
vote
1answer
225 views

Why doesn't my code compile?

...
5
votes
3answers
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 ...
4
votes
0answers
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: ...
7
votes
3answers
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. ...
0
votes
2answers
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 ...
4
votes
1answer
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 ...
3
votes
1answer
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 ...
9
votes
1answer
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 ...
13
votes
3answers
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 ...
0
votes
1answer
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 ...
0
votes
2answers
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 ...
6
votes
2answers
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, ...
2
votes
0answers
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. ...
1
vote
1answer
94 views

Locator with Integer value coordinates [closed]

I want to get the Pixel value of an image.and here is my code ...
10
votes
5answers
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. ...
1
vote
1answer
168 views

Using NMinimize Properly

I'd like to find the point on a Bezier curve that's closest to some other point. The tricky thing is that because Bezier curves can loop around, the distance function can have multiple local minima ...
3
votes
1answer
57 views

Delete `x,y,z` occurrence (or any permutation of it) from parent data set (dynamically)?

Simple question: I would like to dynamically specify a list of 3 elements, {x,y,z}. Then I'd like to find that list, or any of its permutations, in a parent data ...

15 30 50 per page