0
votes
1answer
154 views

Better way to evaluate integral containing Boolean function

I am trying to compute the integral ...
0
votes
2answers
661 views

Classification of a linear system of equations with a parameter

I need to get every possible value of k that returns infinite number of solutions or no solution to this system: ...
0
votes
4answers
69 views

Don't understand why Do-loop index is not evaluated in Play expression

So here is some weird behavior: When I create a list inside a loop whose elements are Play functions, with arguments that depend on the counter, it is as if the counter is being stored symbolically, ...
0
votes
0answers
967 views

PDE problem with initial and boundary conditions

I'm new to mathematica and I don't know what I do wrong, I have written the following PDE problem, with both initial and boundary (four in total) ...
4
votes
3answers
206 views

Long waiting time for computing a summation

It takes a long time to compute the summation below, and I'd like to know if there are alternative ways to compute things faster. When replacing $15$ by $\infty$, then I should get $3^{1/3}$. I need ...
2
votes
2answers
231 views

Transform Piecewise[] into sum of indicators

I'm interested in transforming a piecewise defined function into a sum of indicator functions, ultimately with the aim to be better able to integrate them. As an example I would like to transform the ...
5
votes
1answer
1k views

Continuous wavelet transform with complex Morlet function

The complex Morlet function is defined as: $$Ψ(t,f_c,f_b)= \frac{1}{\sqrt[]{ \pi f_{b} } }\exp(-t^2/f_b)\exp(\jmath 2πf_ct)$$ where $f_b$ and $f_c$ are two important parameters in modifying the ...
0
votes
1answer
304 views

Do loop - variable does not change [duplicate]

I got the follwing code which should add a '1' 100 times to an empty list. plotVals = {} Do[Append[plotVals, 1], {l, 1, Nmax}]; The output is again an empty ...
13
votes
1answer
1k views

Numerical solution of coupled ODEs with boundary conditions

I have to solve the following set of ODEs and just can't get good results using Mathematica $$ r\frac{d}{dr}\left(\frac{1}{r}\frac{d}{dr}A(r)\right)-\xi^2F(r)^2\left(A(r)-1\right)=0 $$ $$ ...
12
votes
10answers
706 views

Counting sublists containing 0

Given a list: data = {{0, 2}, {0, 0}, {1, 0}, {1, 2}, {2, 3}}. I would like to count the number of sublists which contain zero. ...
0
votes
1answer
324 views

How to read image files in Analyze 7.5 format?

I am using GATE/Geant4 for simulating photon beams interacting with matter. For 3D dose distributions, GATE outputs the data into an Analyze 7.5 format [1]. I was wondering whether there exists a ...
2
votes
2answers
143 views

Keep order of mulciplication in Matrix production

{{λ E, B}, {λ A1, λ E}}.{{E, 0}, {-A1, E}} \begin{align*}\left(\begin{array}{cc} E^2 \lambda -A1 B & B E \\ 0 & E^2 \lambda ...
1
vote
1answer
56 views

Am I missing something in this integral?

I am trying to solve this simple integral: ...
2
votes
2answers
299 views

How does Accumulate work?

Accumulate can be used to compute the partial sums of a list. The partial sums can also be computed using a For loop but this ...
3
votes
2answers
556 views

Learning from Michael Trott's Guidebook with V8 or later

I am not sure this question is suitable for this site. Please let me know if my question is too vague or if it is hard to give a clear anwser. I'm a new user of Mathematica. My Mathematica use began ...
6
votes
2answers
107 views

Running MathKernel from Emacs brings cursor to end of line

When I start MathKernel from the Emacs shell, there are always extra spaces inserted so the cursor goes to the far right side of ...
0
votes
1answer
225 views

How to combine two usages of # into one and speed up the code?

I have a function num with two variables, matf and matg. How can I combine the last two lines of code below into one? The code is aimed to find out the maxiaml count bel when we give each $i3 = ...
1
vote
1answer
148 views

Problem with GlobalClusteringCoefficient

I have a simple problem, I would like to measure the global clustering coefficient for a random graph. Here is my code: ...
-1
votes
1answer
533 views

How to remove the background noise from a single sound file? [duplicate]

I wandering if the following steps are practical or not? Import a sound in wav format, if not (for example, mathematica does not support ...
1
vote
1answer
673 views

Want more vibrant colors in plots

Is it possible to create plots that have vibrant colors like those I create in Python? For instance, take this thread function returning 0 where I used rainbow and here is the temperature gradient: ...
0
votes
1answer
130 views

Curve Fitting Errors

I am trying to fit a part of a dataset to the function $$ae^{-b\sqrt{x-c}}$$. My friend was using GNUPlot to this and got reasonably good results. However when I try to this with Mathematica : ...
3
votes
2answers
191 views

CustomTicks - Changing NumberPoint -> “,”

How can I change the number point from . to , in CustomTicks ? The Mathematica built-in ...
-1
votes
1answer
132 views

Plotting a function that uses the solutions to a system of differential equations

I am trying to draw a plot by using the solution of differential equations ...
5
votes
1answer
588 views

ReadList can't read from file containing high-precision Reals

I want to read a file which contains seven columns of real numbers. Mathematica seems to have a problem with the high precision I need. My code: ...
5
votes
1answer
343 views

Use Pattern with Vectors in Assumptions

I had a problem using Pattern with Vectors in Assumptions. Here's how I use ...
1
vote
1answer
225 views

function returning 0

Why is my function returning 0? ...
6
votes
2answers
611 views

Adjusting Density Plot Color Function for Diffraction Simulation

I'm trying to simulate Fraunhofer diffraction by a single slit using DensityPlot I run the code: ...
12
votes
1answer
619 views

Ellipse counting from image

I have hundreds of images similar to this image: I'm looking to count the number of ellipses as well as their major and minor diameters. The ellipses are touching, hence, ...
0
votes
1answer
890 views

Ellipsoid in spherical cordinates

I am trying to plot in spherical coordinates the ellipsoid defined as $$(x/3a)^2+(y/2a)^2+(z/4c)^2=1$$ This is my code: ...
3
votes
0answers
279 views

Exported PDF figure looks different in Apple's Preview than in Adobe PDF Reader

I'm trying to export figures into pdf, and the results looks good in Preview, but very bad in Adobe pdf reader. I'm using Mathematica version 8 on Mac 10.8.5. The Preview version is 6.0.1 (765.6) and ...
1
vote
1answer
90 views

Issues with creating functions [duplicate]

Sometimes when I try to create a function inside a function, Mathematica gives me a hard time. I usually just have to play around with the syntax until it gets something it "likes" but I really have ...
9
votes
8answers
785 views

Position of First nonzero number

I want to know is there any one line code to find position of first nonzero number without calculating position of all non zero numbers. For example, ...
12
votes
4answers
355 views

How to replace every possible $A+B$ and $AB$ in expansion of $(A+B)^{10}-A^{10}-B^{10}$ with $x$ and $y$, respectively?

I would like to replace every possible $A+B$ and $AB$ in expansion of $(A+B)^{10}-A^{10}-B^{10}$ with $x$ and $y$, respectively. How to do it with the simplest code in Mathematica? For example, ...
1
vote
1answer
347 views

Solve a total derivative - independent vs. dependent variables

I am trying to force mathematica to solve a generally defined function for d lp: In a reduced version, w depends on l2, ...
0
votes
1answer
75 views

Manipulate that remembers its own input code and can show it by request

This question is a further question to my previous one. The solution for that question works well as long as the original input Manipulate code is still provided in ...
8
votes
6answers
2k views

Filling a curve to a vertical axis

I am preparing a figure for an article, and I would like very much to be able to fill a curve, but not under it, but to the vertical axis, i.e. to the left. Due to the meaning of the data I present, I ...
2
votes
2answers
241 views

Make fraction with selection in denominator

Using ctrl/ you can make a fraction. If you have selected something it will appear in the numerator. Does there exist a shortcut to make the selected text appear in the denominator instead? If not, ...
13
votes
7answers
1k views

Finding the best way to visualize rather complicated data

I have the following data ...
0
votes
1answer
114 views

How to make an index optional?

Can I define a relation between variables, such that the expression will also be evaluated (then assuming all indices are equal) when no index is given? $$ x_i + y_j = \delta_{ij} ...
1
vote
1answer
435 views

Row-Reduced-Echelon-Form with Equation Parameters for Consistent Systems

I often do row-reduced-echelon-form (RREF) calculations that involve parameters using the RowReduce command. Most times, I want to know which parameters make the system consistent. For example: ...
4
votes
2answers
363 views

Find the value of parameter so that the equation has one solution

Let $(E_l) : x^4-4x^3+x^2(5-l^2)+4 x l^2-4l^2 = 0$ be an equation with $l$ as a parameter and $x$ as an unknown and $S_l$ the set containing all the real solutions of $(E_l)$. Then there is a unique ...
4
votes
1answer
81 views

Evaluate open cell segments in a notebook

The Evaluate > EvaluateNotebook evaluates the whole notebook. Is it possible to somehow evaluate ONLY the open sections of a notebook?
1
vote
2answers
580 views

Coloring vertices using GraphPlot

I have the following problem: I used GraphPlot to plot my adjacency matrix. I divided my nodes in three groups: ...
4
votes
1answer
231 views

Is it possible to interact with an external program's command-line interface?

I am performing a calculation in Mathematica which relies on calls to an external program that acts as a black box for calculating a function $f$, and I would like to know if it is possible for ...
0
votes
0answers
14 views

Part::partd error on one of two similar lists [duplicate]

I have run into a problem that I can't explain. Here is the code: ...
2
votes
4answers
445 views

find the number of integral solutions a+b+c+d+e+f = 18 [duplicate]

Find the number of integral solutions of a + b + c + d + e + f = 18 where a, b, c, d, e, f are elements of the range ...
2
votes
1answer
227 views

How I can make a menu with different graphs with modifiable parameters?

I want a user friendly window in which to have a menu where you can choose the chart you want to display, in which you can move parameters in order to note the width or height of the chart, but I try ...
3
votes
1answer
135 views

how to load everything when opening a saved notebook

generally, when I carry over work in a notebook from the previous day, I have to physically start from the top and re-evaluate every statement before I can begin from where i left off. Is there any ...
0
votes
1answer
116 views

Workaround for automatic replacement of “\r” to “\n”

When I run the following code in an empty notebook SetOptions[EvaluationNotebook[], testOption -> "\n\r"] and then open the notebook in Notepad, I find ...
4
votes
3answers
418 views

Improve the performance of solutions to Project Euler (#14)

Problem I have following code, when n<=10^5 it's not slow, but n>2*10^5 it's became very slow. I think maybe some temp value greater than 2^31-1, so make compile invalid. Could you give any idea ...

15 30 50 per page