4
votes
2answers
91 views

Counting the number of instances of one sub-string within a given string within a lower- and upper-bound gap of a second sub-string

Please consider the situation where I give you a list where entries are drawn from a fixed set of characters: ...
1
vote
1answer
92 views

Parallel evaluation and memory use

I have never used Mathematica's parallel evaluation before and have some trouble getting it to work properly. For the record, I am running Mathematica 9 on Linux with an Intel Core i7 processor (4 ...
2
votes
1answer
29 views

Results of ArgMax as a function of a parameter with InterpolatingFunctions

I would like to obtain a function and its derivatives, where the function is defined as the solution to a maximization problem. The obvious approach ...
3
votes
2answers
81 views

Need to create a function to generate all permutations of Range[$n$] [duplicate]

Basically I need a function that takes a list and gives all the possible permutations of it. The reason I can't use Permutations is that I have to apply another ...
0
votes
0answers
28 views

Mathematica 9.01 and CUDA under VB 2013 and modified CCompilerDriver

I tried to force CUDA using Visual Studio 2013 C compiler by manipulating the VisualStudioCOmpiler file found at C:\Program Files\Wolfram Research\Mathematica\9.0\AddOns\Applications\CCompilerDriver ...
0
votes
1answer
59 views

Series expansion of a complex function

How do I expand a function $f(z)$ in a particular region? For example, how would I expand $f(z)=(z^2-3z+2)^{-1}$ in the region $0<|z-1|<1.$? I believe this can be done by the binomial theorem. ...
3
votes
2answers
446 views

Why are my recursive functions running so slowly? And how do I fix them?

I am working with making numerical solvers for a modeling class I am in, and I want to use the internal recursion handling that is built into mathematcia, but there seems to be a problem. NDSolve ...
2
votes
1answer
43 views

How to return escaped characters from MathLink?

I'd like to return Greek symbols through MathLink from a C function. However, returning the usual escape sequence (such as \[Alpha]) does not seem to work. Here's a minimal example .tm file ...
0
votes
0answers
45 views

Read in bezier curve from svg file

I am trying to do some calculation of some svg file,After read in with Import["filename","XML"]and some easy operation, I can get the string of the bezier curve, ...
0
votes
1answer
52 views

Unable to configure a system of differential equations

My differential equations have been written as ...
0
votes
0answers
37 views

Defining a function in Mathematica [on hold]

Get the list oddthree of numbers between 100 and 2000 which are the product of three distinct odd primes. Hint: use a Select your condition should be a combination of ...
0
votes
1answer
200 views

Solving recurrence relationship using iteration

I am trying to create a Mathematica function that basically splits up a continuous function (in this case a physical potential) into steps (strips as it were) and returns the value of the function at ...
0
votes
1answer
77 views

combining plots [on hold]

I've made the following plot ...
5
votes
2answers
254 views

Pruning elements in an array based on the existence of similar elements in adjacent arrays

Imagine I have a series of particles floating around in $\mathrm{R}^3$, where, at any given time, particles can pop into and out of existence. Here, for some number of time points, $(t_1, \dots, ...
0
votes
1answer
77 views

How to produce functions [on hold]

I want to produce n functions. For example, assume that by giving n=3, 3 definite integrals will be created, like the following: ...
-1
votes
0answers
69 views

Errors of machine precision [on hold]

I receive this error and do not understand this. What is it? Actually I'm not doing any ABS or Log of something I don't know how it has popped up in calculations? N::meprec: "Internal precision ...
18
votes
2answers
346 views
+50

How to implement FittedModel like objects

In the course of making some RLink wrappers I want to have some richer containers like Mathematica does with its FittedModel ...
9
votes
2answers
229 views

Create a new infix operator

It is well known that the infix operator @@ is used as a short form of Apply. For example, both ...
1
vote
1answer
56 views

Same Mathematica 9.1 Student License on both Ubuntu and Windows 7 [on hold]

Is it possible to install Mathematica 9.1 on both Ubuntu 12.04.3 LTS and Windows 7 Home Premium on the same machine. I want to be able to use Mathematica on Ubuntu since I wrote some numerical codes ...
2
votes
1answer
67 views

MathLink c++ passing lists of real values simple example

So this may come down to me not being a very competent programmer but I am struggling with passing list from Mathematica via MathLink that aren't of integers. The final code I am hoping to get out of ...
1
vote
0answers
62 views

Is there any way to define a new binary operator? [duplicate]

I am looking to define a new operator that would work similarly to the + or - operator. My end goal is to make a dice operator for calculating random distributions in the normal d20 fashion (e.g. 5d6 ...
0
votes
1answer
41 views

Solving a system of equations where two variables can only be one of several discrete values

I want to solve a three-equation system, but I need to constrain two of the variables so that they can only take one of several discrete values that I would specify (this is a circuit design problem ...
0
votes
0answers
21 views

Minimize solution to linear system with singular system matrix

I am trying to solve a time-dependent linear system with a singular system matrix, $A$, thus an infinite number of solutions, ${\bf x}$(t), exist that satisfy the linear system. The solution I am ...
0
votes
0answers
42 views

DSolve failing to solve second-order ODE with two boundary conditons [on hold]

I am utilizing Mathematica to solve the following equation: $$y^{''}(x)-5y^{'}(x)+10y(x)=10x $$ The following stated boundary conditions are supplied: $$y(0)=0 \ \ y(1)=100 $$ The following error ...
4
votes
1answer
92 views

How can I prevent a Plot expression from evaluating points forbidden by its RegionFunction?

I just ran into this and it had me scratching my head for a good while. Say I have a function which may produce error messages for certain inputs, like e.g. ...
3
votes
0answers
35 views

Machine precision infinity

Is it possible to obtain the machine precision (double) version of Infinity? This is useful when using LibraryLink and C ...
0
votes
1answer
49 views

How to manually set z-axis values in a 3d plot?

I'm plotting an hemisphere with ...
4
votes
1answer
116 views

Unexpected result when reading Cell with comment-lines by NotebookRead

When considering this question about re-formatting Cell (also this one), I encountered an issue which confuses me. I'll let the code itself speak: Consider the ...
0
votes
1answer
66 views

What is the comment shortcut?

I went to a Wolfram Technologies workshop a few weeks ago and the presenter showed us a keyboard shortcut that when a block of input is selected, the shortcut puts the block of selected input in ...
25
votes
3answers
2k views

How to embed fonts when exporting Mathematica graphics as PDF

Upon exporting a Mathematica graphics expression as a PDF, Mathematica does not seem to embed any nonstandard fonts used. When you open the resulting PDF document with a PDF viewer, all the text items ...
1
vote
1answer
80 views

Behaviour of OutputResponse in ListLinePlot

Ok, I think this is not the best way to do this, so I'm open minded for every suggestion doing it in a better way. The Question is why does ListLinePlot not plot ...
1
vote
1answer
35 views

Multiple Linear Regression - obtaining equation with constant term

I am trying to use the LinearModelFit function to obtain a linear regression of my 5 inputs for my single output. I have the input data: ...
12
votes
3answers
314 views

Can TreeForm be displayed “sideways”?

One recurrent problem I'm having with displays generated with TreeForm is that the expressions to be so displayed often at least one level with many (> 20) nodes ...
26
votes
5answers
1k views

Identifying critical points of 2/3D image/cubes

Upshot I am interested in identifying critical points of a 3D field/cubes (maxima, minima, tube-like and wall-like saddle points) and 2D field/image (maxima, minima, saddle points). I.e. the ...
2
votes
0answers
26 views

ContextPath and autocompletion with subpackages

I'm developing a larger package which includes several subpackages. My problem is, that I can't introduce the symbols in the subpackages to the autocompletion by loading the main package, but by ...
9
votes
4answers
847 views

How do I find the coordinates of points in this image?

I have never used image processing with Mathematica. I need to get the coordinates of the red points from this image I made in Illustrator. Is there a way to get Mathematica to read or detect the ...
6
votes
0answers
132 views

Incorrect evaluation for Thue-Morse signed harmonic series

I would like to evaluate $$s = 1 - \frac{1}{2} - \frac{1}{3} + \frac{1}{4} - \frac{1}{5} + \frac{1}{6}+\frac{1}{7}-\frac{1}{8} - ... + \frac{(-1)^{\textrm{binary digit sum}(n-1)}}{n} + ... $$ where ...
4
votes
3answers
95 views

Creating centered inline cell in text cell

The cell corresponds to the textual form ...
0
votes
2answers
118 views

Taking averages at certain intervals

I am trying to take averages of a large two dimensional array at certain intervals. For example, for the first row, I want to take K averages of 500 values. Here is what I am trying ...
0
votes
0answers
16 views

How to set up the font size permanently (i.e. for all notebooks, all future sessions?) [duplicate]

The default input / output font size in Mathematica's notebooks are too small for my screen. I would like to set up permanently a conveniently larger font size so that in any future session I get ...
1
vote
1answer
64 views

Sectional averages of a list [on hold]

I am working in Mathematica. I have a table of 200 elements. I want to calculate the mean value for the first 20 elements, for the second 20 elements and so on, up to 200. I will get a table (matrix) ...
1
vote
1answer
70 views

What is happening in Map[Function[x, x^2], a + b + c] from the Pure Function tutorial

The Pure Function tutorial gives an example: Map[Function[x, x^2], a + b + c]. I would expect the output to be (a + b + c)^2, ...
0
votes
0answers
37 views

How to plot a “pressed” hemisphere [duplicate]

What I'd need is to draw an hemisphere of given radius but then it should have a reduced height. I don't mean a section of an hemisphere, I mean that the hemisphere should be pressed/flattened...so ...
4
votes
2answers
189 views

Formatting text through pattern matching

I am trying to format some text based on some patterns. ...
0
votes
2answers
77 views

Testing the Erdos square free conjecture

Can someone please answer these two parts of my homework assignment? Adding an explanation would be appreciated! a. Test the Erdos square free conjecture for $n <= 30000$. You should use ...
0
votes
1answer
40 views

What is wrong with this code compilation? [on hold]

I'm trying to factor this complicated polynomial (and also plot it, but that'll be worked out later)
1
vote
0answers
26 views

CDF to give away with a custom StyleSheet

Related to this. I would like to be able to give away CDF documents created with a custom StyleSheet. The important peculiarity is that this document is assumed to be viewed on a machine with no ...
0
votes
2answers
47 views

Integrating a half-normal pdf

The pdf of a half normal distribution is: $\frac{\sqrt{2}}{\sigma\sqrt{\pi}}$exp$\left(-\frac{x^2}{2\sigma^2}\right)$, $x>0$ ...
0
votes
0answers
35 views

How to make the MMA document has the background--color effect when the dounment is printed?

Description: Recently,I use the Mathematica to do my undergraduate paper,I would like to use the Mathematica to compose my paper. So I hope the Input and Output results have the ...
2
votes
1answer
76 views

Plotting Network with LayeredGraphPlot with specific order

I have a network and want to plot it. I use LayeredGraphPlot, and the network is described as: ...

15 30 50 per page