2
votes
1answer
88 views

Ordering for Pattern matching in Subscripts

I have some transformation rules acting on subscripted variables. When I match the a product the order matters. ...
3
votes
2answers
480 views

Image processing: extracting ordered contour

Continuing the question How to extract the edge from a set of points and its answer by Simon Woods, I would like to ask if there is a way to extract the boundary of obtained as ...
0
votes
1answer
156 views

Impose an specific Trigonometric expansion with TrigExpand

Is there a way to impose in mathematica an specific trigonometric expansion with TrigExpand? I have various double-angle expressions for cosine and sine in my ...
1
vote
0answers
176 views

BVP system of nonlinear coupled ODEs

Here I am, trying to solve this system of coupled ODEs (up to a minus sign): $ u''=6u^5-(8+4a)u^3+(2+4a)u+\frac{2u((w^2-s)^2+bw)}{(u^2+c)^2}$ $ w''=\frac{4w^3-4bw+b}{u^2+c}$ with the boundary ...
2
votes
1answer
148 views

How to preserve the order of terms in the output

Is there a way in which mathematica can preserve the order of operations while it evaluates an expression?, for instance: In my short example ...
1
vote
1answer
173 views

show fit information on plot

After performing a fit in Mathematica, I would like to show the fitted parameters in a box on the plot showing the fitted function. How would I go about achieving that? Here is a MWE: ...
1
vote
1answer
65 views

using deletecases for twittermessages using the timestamp

I have a Excelsheet with tweetsmessages. These tweets are all written in Dutch. I would like to analyse these tweets in relation to the timestamp. ...
0
votes
1answer
480 views

Plotting 2D function and other 3D functions coincidently

ContourPlot3D[{x^2 + y^2 == z, 2 y == z, x^2 + (y - 1/2)^2 == 1}, {x, -2, 2}, {y, -0.5, 1}, {z, 0, 2}] The above isn't what I'm seeking. I'd like to plot ...
1
vote
3answers
205 views

How to replace identical positions in two different lists

Assume that I have two lists like : list1={1,2,3,4,5}; list2={a,b,c,d,e}; I want to replace some elements from list1 into ...
7
votes
2answers
383 views

Reconstructing an image from overlapping patches

The Mathematica function ImagePartition can create overlapping sub-images with the pixel offset options {dw, dh}: ...
2
votes
1answer
213 views

UnitSimplify returns unexpected non-SI unit combination

I am trying to get units working in mathematica in the following expression for diffusion: $D = {K_B T}/{3 \pi \eta L}$ My code is as follows: ...
1
vote
1answer
99 views

Difficulty finding Expectation of a special function

I have a special function given as: $${\rm f}\left(r\right) ={1 \over \beta\lambda}\,2^{r/\beta} \exp\left({\left[2^{r/\beta} - 1\right]K \over \lambda}\right)$$ I should find the Expectation of ...
0
votes
0answers
63 views

For loop efficiency [duplicate]

What is a more efficient way of solving this problem? By considering the terms in the Fibonacci sequence whose values do not exceed four million, find the sum of the even-valued terms. ...
1
vote
1answer
96 views

How to input pure function to package?

I would like to input a pure function into a custom written package, but am running into a variety of errors. The package I have created is as follows: ...
3
votes
1answer
281 views

Covariant derivative for symbolic tensors

I want to define a "prefix" (D_i) covariant derivative operator CD[] for symbolic tensors in form of a function, i.e. for ...
0
votes
0answers
39 views

Notification when evaluation completes [duplicate]

I thought it would be fun to see a list of ways to have Mathematica notify you when a long evaluation completes. There are a few posts up already that address specific methods, given below, but not ...
-1
votes
1answer
113 views

Transformation of a simple logic statement

I'm designing a logic circuit and I was wondering if the following two things are equivalent: (x <= y) and (x < (y + 1)) I can't think of any set of numbers that would make these two things ...
0
votes
0answers
47 views

Can Mathematica find the discriminant formula? [duplicate]

This question is not really practical, but rather a curiosity question. Can Mathematica solve a quadratic equation without its discriminant? I mean, whenever it see a quadratic equation it tries to ...
0
votes
1answer
111 views

Correct way to use Notation

I have tried to create some Notation declarations as follows ...
0
votes
0answers
34 views

I am having a Plot and i need inside a Do loop to export 100 frames (changing the bounds of the plot) [duplicate]

for some reason i was thinking of doing this Do[ Plot[F[x],{x,-i,i}]; Export["name_0" + i + ".jpg", %, "JPEG", ImageSize->{250,250}], {i,5}] but i get an ...
0
votes
1answer
298 views

Manipulating a piecewise function

A while ago I posted a question regarding differential equations. It was supposed to model heat transfer. We've refined our model a bit (using numerical methods now). Our code now looks like this: ...
0
votes
0answers
237 views

Loop integrals (quantum field theory)

I am attempting to compute the one loop contribution to the Higgs mass, and the one loop integral is somewhat difficult. I decided to try and get Mathematica to do it, to see if the answer can point ...
1
vote
1answer
177 views

Discrete sampling of interpolating function returned by NDSolve

When solving an ODE with NDSolve, Mathematica returns an interpolation function. I need a discrete sampling of this function however. Naively, I can write this as (example): ...
1
vote
2answers
188 views

Do multiple instances of Mathematica run completely independently?

Let me simplify the problem I am trying to solve so that the issue I face is highlighted. Say, I want to generate $n$ samples of a Gaussian random variable. I have a script (say ...
1
vote
0answers
66 views

Optimization problem test suites

Mathematica provides nonlinear, unconstrained test problems here: Needs["Optimization`UnconstrainedProblems`"] and LP test problems here: ...
1
vote
3answers
132 views

Symbolic derivatives of special functions yield incorrect results

When I evaluate with Mathematica this expression D[ Abs[ Zeta[x + I y]], {x, 2}] + D[ Abs[ Zeta[x + I y]], {y, 2}] 0 the ...
0
votes
2answers
197 views

What is wrong in my calculation with clebsch-gordan coefficients?

According to theory of angular momentum here must equal one. What's wrong? ...
1
vote
0answers
55 views

Set Standard Plot Thickness [duplicate]

All of my plots should have the same set styling, that is, for instance, {ImageSize->460, Frame->True, PlotStyle->Thickness[0.004]}. Of course I do not ...
0
votes
1answer
60 views

How to put some values from a list into a function in a Do loop

I want to program a code in MATHEMATICA in order to calculate some values in different iteration. For example, assume this list: list={1,2,3,4,5} Now assume that ...
0
votes
1answer
129 views

Replacement rules in combination with pure functions to make a change of variables

I have defined my function in this way w = f[r,Θ] ; After some calculations i obtained my results with respect to the previous function. For instance: ...
6
votes
1answer
423 views

Image fading from one corner to the other

I'm preparing a presentation where I want to place a background image on each slide (for aesthetics). These are extremely color filled images (like photos; lets use "ExampleData/lena.tif" as ...
0
votes
0answers
74 views

Optimization of vector manipulation

I'm trying to implement an upwind scheme for solving transport equation (at first, I work with no right hand side and the simpliest case possible - velocity is constant, initial data is smooth, etc). ...
1
vote
2answers
131 views

Avoid making repeated Random Integer in different iterations

Assume following code : Do[ i1 = RandomInteger[{1, 5}]; i2 = RandomInteger[{1, 5}]; While[i1 == i2, i2 = RandomInteger[{1, 5}]] , {k, 1, 4}];` This ...
0
votes
0answers
227 views

Eigenvectors for a large symbolic matrix

I'm trying to compute the eigenvectors for a 42x42 symbolic matrix (with one variable) in Mathematica. I get the following error: Eigenvectors::eivec0: Unable to find all eigenvectors. >> and the ...
3
votes
0answers
61 views

Needs, Get and << [duplicate]

I think I read somewhere that Needs is the recommended way to import dependencies, but I usually see << used in examples. ...
2
votes
0answers
52 views

Notation, Format and Interpretation

I am unclear on the exact relationship between Notation, Format and Interpretation. ...
0
votes
0answers
49 views

Applying Notation rules retroactively to a notebook

Suppose I define a new notation rule like Notation[OverBar[x_] ⟺ mean[x]] If I already have some notebooks that were written using ...
0
votes
1answer
181 views

Defining a new matrix product of matrix function [closed]

Suppose I have two matrices A, B, whose entries are functions of x. Suppose they are 2*2. In the product, each entry is of the form $\sum_k A_ik B_kj$. There are two summands corresponding to k=1,k=2. ...
2
votes
3answers
470 views

Writing a simple application: interactive quiz for multiplication table practice

I am trying to write a very simple application in Mathematica: a quiz that tests a multiplication table(let's use the 9x9 for this example). The app will display a question(e.g. 7x5), and the user has ...
7
votes
1answer
558 views

Why won't my function plot?

If I define ...
1
vote
1answer
128 views
-1
votes
2answers
130 views

Why won't Mathematica work with quantities or Quantity[]? [closed]

As you can see in the screenshot below, Mathematica is simply not evaluating any quantities. It is simply listing them as I wrote them. Could anybody give me a pointer as to why this may be?
2
votes
0answers
87 views

Add content to an existing .zip file

I have been looking over the .zip documentation from Mathematica (http://reference.wolfram.com/mathematica/ref/format/ZIP.html). It seems pretty straighforward to export and import from/to a .zip ...
3
votes
1answer
98 views

How to make Mathematica Simplify?

Let us define r1 = 1;r2 = 2; and ...
5
votes
0answers
145 views

Challenge: Speeding up MaxDetect for application in 3D blob detection

In image segmentation it is a common problem that objects appear clustered and are therefore undistinguishable from each other when using simple algorithms. Based on this post I obtained efficient ...
1
vote
1answer
116 views

Requesting explanation of FitModel code

I am struggling with understanding the code given in this original post I understand how the tests are conducted, both of them. However, I do not understand this part: ...
1
vote
1answer
337 views

How to find the local maximum of a list [duplicate]

I have imported a wav sound that a = Import["sound.wav"] and we know that soundStrength = a[[1]][[1]] is a list of sound ...
2
votes
3answers
173 views

Extracing information from a table

I am new to Mathematica. I have created a table of real numbers. I want to create a new table that contains the set of values of $i$ such that, in my original table, the $i$th entry is greater than ...
1
vote
0answers
67 views

Challenge: Creating Compilable Permutations Function

As Mathematica's implemented Permuations function is not compilable I tried to write my very own Permutations implementation, called ...
2
votes
0answers
204 views

Faster Ways to compute recursive summation

It takes a long time to compute the summation below, and I'd like to know if there are some better ways to compute things faster. I have used $3$ ways to calculate, but they are very unsatisfactory. I ...

15 30 50 per page