1
vote
0answers
104 views

Simple Jacobians, Gradients, etc. with arbitrary length vectors/matrices?

Is there any way (or a package built for it) can do simple operations with vectors and matricies of arbitrary size, but conforming extents? For the simplest example to test, given an arbitrary vector ...
0
votes
1answer
194 views

Why does Mathematica find a form for this general sum, but not for some special cases?

Today I found a Sum which Mathematica will simplify for a general parameter value $\nu$, but which will not simplify fully for special cases $\nu = 1, 3, ...$ despite the fact that the general answer ...
21
votes
2answers
287 views

Plotting a defined function gives different results from plotting the function directly

Consider the following piece of code: function[t_]:=Exp[-9 t^2]; LogLogPlot[{function[t],Exp[-9 t^2]},{t,.01,100}] I expect the two plots to exactly overlap each ...
4
votes
1answer
716 views

How does Mathematica estimate error on fit parameters?

When performing a fit using NonlinearModelFit (or any of Mathematica fitting functions, but I am particularly interested in nonlinear models), Mathematica makes a ...
1
vote
2answers
162 views

Notation for implicit derivative

Consider the following line of code: D[x == y^3 + x y, x, NonConstants -> y] The output would be: ...
1
vote
2answers
108 views

How do I operate on this list elegantly? [duplicate]

calibData = { {200, 10}, {100, 20} } MapAt[N, MapAt[Log10, calibData, {;; , 1}], {;; , 1}] I want to apply a base 10 Log to the first element of each tuple. ...
15
votes
1answer
385 views

How to represent a continuous monotonic phase of Airy functions?

Note: In this question I am concerned only with real-valued variables and functions. DLMF, §9.8 Airy Functions, Modulus and Phase, formula $9.8.4$ defines the phase of Airy functions: ...
3
votes
0answers
281 views

Taking real and imaginary parts of indexed functions and speeding up ComplexExpand

I am setting up a large system of ODEs and in order to use the IDA method (which is sig. faster for my system and thus attractive), I must split my equations into real and imaginary parts. I am ...
12
votes
1answer
458 views

Does anyone have experience with performing symbolic regression using Mathematica?

I understand that there is at least one Mathematica package, DataModeler commercially available for symbolic regression. I'm seeking any observations with this or any other similar tool. I'm ...
5
votes
4answers
492 views

How can I prevent Superscript from being interpreted as Power?

I have very strong desire to use superscript as the index of the variable. However, it looks like that the Mathematica automatically recognize the superscript as the power and I got message that my ...
1
vote
0answers
86 views

Help with Integrals (and conditional expectations) of the Beta distribution: Integrate[e^(az) z^a (1-z)^b, {z, 0, 1}]

I have a Beta distribution, and am interested in calculating expectations and conditional expectations. The domain on the distribution is $z \in [0,1]$ Ignoring constants of proportionality, the ...
4
votes
1answer
162 views

Pretty InputField

I'm trying to create a "template" notebook for myself. I want to get input from a single InputField, and then run a few operations on it. How can I make the ...
2
votes
3answers
97 views

List Manipulation matrices

I have the following two lists: List A: ...
1
vote
1answer
63 views

Using the error messages that gets generated while executing

While executing code it is normal to get the messages like shdw,argx etc. I wanted to know if there is anyway i can store all these messages into a array or a variable so that i can pinpoint where the ...
21
votes
2answers
468 views

How to write beveled fractions?

How to write beveled fractions like ${}^a/_b$? In contrast to $\frac{a}{b}$ and $a/b$ (see this question).
0
votes
0answers
65 views

what can be the reasons for webmathematica kernel to quit?

I am new to webmathematica. I wanted to know under what circumstances can a kernel quit the processing.
9
votes
1answer
565 views

Uniformly distributed n-dimensional probability vectors

What's the right way to generate a random probability vector $p={p_1,\ldots,p_n} \in {(0,1)}^n$ where $\sum_i p_i=1$, uniformly distributed over the $(n-1)$-dimensional simplex? What I have is ...
0
votes
1answer
162 views

Constraint on variables in summation

Is it possible to have a constraint on variables in summation of series just similar to pattern constraint e.g. ...
9
votes
3answers
507 views

Remove redundant dependencies from a directed acyclic graph

Given a directed acyclic graph, I want to remove all the edges $v_i \rightarrow v_j$ if $v_j$ is reachable from $v_i$ by some other path. Given the rich set of graph algorithms in Mathematica, what is ...
17
votes
1answer
566 views

Calling Mathematica from Visual Studio - example

I am trying to set up a connection between Visual Studio 10 and Mathematica 8.0 on a Windows system. I found several sources of information on the Wolfram website, but I get entirely lost. Most of the ...
3
votes
0answers
84 views

Stylesheet modifications mimicking Stack Exchange styles

I find myself frequently highlighting and formatting portions of text cells in a Mathematica notebook. Bold and Italic typesetting is easy to handle but I would like to use ...
1
vote
0answers
57 views

Getting InputStream errors when including a call to ElementData within an Import definition

So I am writing an ImportExport converter for a common chemistry file format, and I've run up against a problem that seems to be about shared streams and whatnot. ...
2
votes
3answers
199 views

How to code the following product?

I am trying to examine the properties of the following product for a given tuple $\vec \lambda = (\lambda_1, \lambda_2, \dots, \lambda_n)$, then the product is as follows: $$ \dim \Gamma_\lambda = ...
5
votes
1answer
132 views

Strange phenomenon with Outer

...
8
votes
3answers
697 views

Can Mathematica solve this sort of functional/differential equation?

I am looking for differentiable functions $f$ from the unit interval to itself that satisfy the following equation $\forall\:p \in \left( 0,1 \right)$: $$1-p-f(f(p))-f(p)f'(f(p))=0$$ Is there a way ...
2
votes
3answers
312 views

Outputting a fraction on one line with an oblique division sign

How can I make Mathematica output a fraction as x/2 as opposed to the x on top with a horizontal bar and ...
4
votes
3answers
205 views

Why the inequality does not take into account the domain?

I have this inequality: Reduce[(4000-1000k)/(k-4) < 0] and the answer is k ∈ Reals I would expect ...
5
votes
2answers
109 views

Why does MakeBoxes mess up RowBox ordering?

When I use RowBox for MakeBoxes the order of the elements is changed for TraditionalForm, if there is a plus (+) in the list of elements. ...
9
votes
2answers
332 views

Why is ParallelMap way slower than Map

I recently tried to use ParallelMap instead of Map and to my surprise encountered that ...
4
votes
1answer
160 views

Custom display format for custom operator

I've tried searching here and in the WRI documentation, but I haven't found what I'm looking for in either place. I'm defining a dx operator to act as a ...
13
votes
5answers
697 views

How to correct my code for solving the Josephus problem?

Problem Decription Recently, I have been reading the book Schaum's Outline of Mathematica (2nd Edition), where I encounted the problem: Flavius Josephus was a Jewish historian of the first ...
11
votes
2answers
655 views

How to improve the accuracy of this Monte Carlo simulation

A friend of mine went on an interview and he was asked to calculate the angle between the hour hand and minute hand of an analog clock when the time was 3:15. Arguably, this is a trivial problem that ...
5
votes
7answers
673 views

Better code to find Narcissistic number

My code finding Narcissistic numbers is not that slow, but it's not in functional style and lacks flexibility: if $n \neq 7$, I have to rewrite my code. Could you give some good advice? ...
6
votes
4answers
277 views

How do I find the number of countries that have a type of industry?

I am trying to find the number of countries that have a certain type of industry. Currently, I have this code: ...
13
votes
1answer
1k views

What's the correct way to shift zero frequency to the center of a Fourier Transform?

I'm trying to Fourier transform a one dimensional list of a time history of some quantity using the Fourier function. I'm interested in the frequency spectrum, but ...
0
votes
1answer
137 views

Better way to evaluate integral containing Boolean function

I am trying to compute the integral ...
0
votes
2answers
556 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
63 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
750 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
185 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
179 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 ...
4
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
212 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 ...
12
votes
1answer
926 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
683 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
240 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
119 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
54 views

Am I missing something in this integral?

I am trying to solve this simple integral: ...
2
votes
2answers
266 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
442 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 ...

15 30 50 per page