Questions about the use of built-in Mathematica functions, including pure functions.

learn more… | top users | synonyms

19
votes
0answers
275 views

Why does list assignment with a packed array result in unpacked values?

This is another question on the design choices in Mathematica. I understand that without direct reply from the developers it may not be possible to give a definitive and exhaustive answer to "why" ...
9
votes
0answers
216 views

How is the mysterious Raw function used?

I have never seen an example use for the mysterious Raw function: Raw[h, "hexstring"] constructs a raw data object with head h, and with contents ...
7
votes
0answers
179 views

What Method options does FindInstance accept?

While answering Trouble getting FindInstance to return multiple results for certain constraints it became clear that for this problem FindInstance would be better ...
5
votes
0answers
167 views

Strange Integrate behavior (a bug!)

The following two calculations should give the same result. After all, integration is a linear operation. I have pasted the code below in case you want to play with it. ...
5
votes
0answers
193 views

Is everything in Mathematica ultimately stored as a rule?

My current understanding about Mathematica is that everything, at the lowest level, ends up as replacement rules. First question: is this true? Second question: does Mathematica "gloss over" these ...
5
votes
0answers
84 views

Is there something like MaxProcessorUsed?

For standard procedures it is easy to test if the implementation is better or worse than other by using Timing etc. It does not help us with creating ...
4
votes
0answers
146 views

Strange behaviour of MMA in derivatives of some standard functions

There are some peculiar things to be discovered in derivatives of some standard functions in MMA: Strange behaviour Example 1: Abs We have ...
4
votes
0answers
84 views

Make Mathematica show function template's arguments in different lines (i.e. in column) by default?

I feel a bit uncomfortable with Mathematica 10's layout. I mean, I'm impressed how powerful functional programming can be and so on, but it's me or those programs are often just a bunch of nested ...
4
votes
0answers
58 views

FlipView can't handle CurrentValue[“MouseOver”]. Kernel crash

Is this code crashing your Mathematica session? (it can so look out :P) ...
4
votes
0answers
115 views

Can Mathematica Operators be combined in a linear fashion for readability?

Here's a simple example. Suppose we want to find the off-diagonal matrix of m: m={{1,2},{3,4}} This can be solved fairly simply by extracting a list of the ...
3
votes
0answers
53 views

Listable on first level

I have some function which take List as input. f[l_List]:=someActions[l] I need apply this function to a list of lists. Now I ...
3
votes
0answers
108 views

“Off-label use” of Mathematica functions for performance

Assisting an acquaintance with a simulation where a very large number of binomial probability calculations are required, I pointed them to a slightly obscure function to dramatically speed up their ...
3
votes
0answers
118 views

Do a gauge transformation for a Chern-Simons theory?

Suppose we have the following Lagrangian density: $$ L=\epsilon^{\mu\nu\rho}\big(\sum_a A^a_{\mu}(x) \partial_\nu A^a_{\rho}(x)-\sum_{a,b,c}\frac{1}{3} f^{bca} A^a_{\mu}(x) A^b_{\nu}(x) ...
3
votes
0answers
87 views

Gather dependency on list order?

I get intrigued about Gather behavior on this post. I thought that Gather was invariant under list order? Here is the result I ...
3
votes
0answers
89 views

Finding the argument set for internal functions in Mathematica v9.0

I've recently run into a problem with importing TIF stacks in Mathematica: Slow import of multigigabyte TIF image stacks On the advice of Simon Woods and others, I've been looking into the behavior ...
3
votes
0answers
145 views

Mathlink and multithreading

In order to make my computations faster I have developed a C/C++ application calling Mathematica kernel and performing many operations using Mathematica functions for equation solving. Now I want to ...
3
votes
0answers
104 views

ProbabilityDistribution PDF on boundary points

I would like to evaluate the PDF of a custom ProbabilityDistribution at the min and max values. However, PDF[...] returns 0 at ...
2
votes
0answers
89 views

Generating function for Newton series?

The function GeneratingFunction gives generating function for Taylor series. Is there a similar function for Newton's series? $$f(x) = \sum_{k=0}^\infty \binom{x}k \Delta^k [f]\left (0\right)$$
2
votes
0answers
32 views

Evaluating standard functions of general quaternions symbolically

Mathematica can easily compute exponentials and logarithms of concrete quaternions: ...
2
votes
0answers
49 views

Maximizing Large Multivariable Function over Region with Parameter Constraints

Brand new Mathematica user here. I have a complicated function to maximize, and thought I would try software like Mathematica instead of taking derivatives by hand. I found some Mathematica ...
2
votes
0answers
96 views

Which functions automatically generate new functions?

In his video http://www.wolfram.com/broadcast/video.php?channel=362&video=1643, Wolfram gives the following example: the output from ...
2
votes
0answers
97 views

A math function similar to “LatticeReduce” for finding linear independent basis

We would like to ask a math function similar to "LatticeReduce" for finding linear independent basis. The input is a list of vectors $M=\{v_1,v_2,v_3,\dots\}$, with the following property: There is a ...
2
votes
0answers
63 views

Complicated output from simple Eigenvalues problem

I have code that uses Eigenvalues on matrices of various sizes. But the output of what should be a very simple problem, namely finding the eigenvalue of a 1x1 matrix, is overly complicated. ...
2
votes
0answers
53 views

Can BreadthFirstScan be modified?

I would like to obtain a "slick" implementation of A*-search algorithm on Graph objects, using the built-in BreadthFirstScan (if that is possible at all). I noticed that BreadthFirstScan is static in ...
2
votes
0answers
74 views

Are there some other ways to solve a second PDE except DSolve?

I have a partial differential equation as follows: $$\frac{\partial p(x,t)}{\partial t}=\text{Dp} \frac{\partial ^2p(x,t)}{\partial x^2}-\frac{p(x,t)-\text{p0}}{\tau }$$ What I try to do was to get ...
2
votes
0answers
80 views
1
vote
0answers
43 views

Inconsistent linearity of inverse Fourier transform

Bug introduced in 8.0.4 or earlier and fixed in 9.0.1 or earlier I am trying to compute the inverse Fourier transform of this expression ...
1
vote
0answers
67 views

How do I choose only one branch of ArcTan?

I have a problem concerning ArcTan drawing a graph using ListPlot. I import a table of data: ...
1
vote
0answers
133 views

Speeding Up Image Processing Functions

I am working with stacks of 1024x1024 timelapse microscopy images that I am performing a series of image processing functions on to help segment each image. These functions include ...
1
vote
0answers
68 views

Expression for evaluating multiple functions?

I am constructing 3D data points for a plot and corresponding to specific conditions "manually". I define the values of five parameters [these I always have to define myself]. From those, I evaluate ...
1
vote
0answers
55 views

How to find matrix exponential using RootSum?

From what I've been able to deduce, Mathematica uses a root sum scheme to determine the exponential of a matrix. Can someone please explain to me the theory behind this? I've searched, but have had no ...
1
vote
0answers
69 views

Find eigenvalues without filling the matrix

Is it possible to find eigenvalues of a matrix without filling it? The matrix elements are given by a known function f[p1,p2]. This is relevant for a matrix too ...
1
vote
0answers
128 views

Derivative of the Absolute Value Function in Mathematica looks very different from the actual answer

Derivative of the Abs Function in Mathematica looks very different than the actual answer. Why? How to correct this? For example I entered ...
1
vote
0answers
39 views

How to apply an rule to factors matching a certain form

Suppose we have many expressions involving irrational ArcTan expressions (such as ArcTan[Sqrt[3],5]) along with other irrational factors (such as ...
1
vote
0answers
154 views

Slow mixture fitting when having ill-conditioned covariance matrices. How to make it faster?

I'm using Mathematica 9.0 to fit multidimensional observations with a gaussian mixture. To do so I first adapted these steps to ensure that the mixture parameters are well defined (see ...
1
vote
0answers
70 views

Distinction between 2 NETTypeInfo answers

In a NETLink application I checked all the types offered by LoadedNETTypes[] according to the following: ...
1
vote
0answers
71 views

Decapitating “explicit” and “implicit” heads

This is a follow up to this question. So far, I named "explicit" heads to those that appear explicitly in the expression. For example, f[x] has an explicit head. I ...
1
vote
0answers
127 views

parameter NDSolve

the question I need to solve is: t x'[t] == -x[t] + y[t], t y'[t] == -5 t^2/x[t]^2 + x[t] - y[t], x[1] == 4, x[b] == 1 in order to solve the coupled ...
1
vote
0answers
159 views

Positive integrand giving negative answer

I'm integrating a positive function f(t) times sin(t) from 0 to pi/5 and get -38. Actually f is slightly negative for a short time (smallest value ~ -0.0005), but far from enough to explain this. ...
1
vote
0answers
106 views

CDF with numerous independent manipulate objects

I have been working on my senior project that involves the creation of a CDF with multiple Manipulateexpressions. I need to protect my code so I have been trying to ...
1
vote
0answers
581 views

How to Output Chi-Squared Statistics when using NonLinearModelFit

I am using NonLinearModelFit for some curve fitting and I was wondering if NLM is able to output chi-squared/leastsquared statistics from the best-fit parameters and confidence intervals. From my ...
1
vote
0answers
81 views

Does Graphics`Mesh`SimplePolygonQ[] work for you?

Graphics`Mesh`SimplePolygonQ is an undocumented function. I'm using Mathematica 7, and when I try: ...
1
vote
0answers
89 views

Solving for vector elements in a function to which the vectors are not passed explicitly

I want to define a function which takes in two integers (indicating the lengths of 2 vectors), and solves a simple set of expressions at a set of points to find all the values in both the vectors. so ...
0
votes
0answers
82 views

Defining a Gaussian Distribution Fit to data

I am given a set of data and told ahead of time that the data will need to be fitted to a Gaussian Distribution. I know that Mathematica has preset functions for linear, quadratic, and cubic fits, but ...
0
votes
0answers
19 views

System of Nonlinear equations with Gamma and Incomplete Gamma function

The next two nonlinear equations are cumulative ratios of a production system. The mathematical model includes two essential parameters (n, tau) that can be obtained by solving this system. I'm ...
0
votes
0answers
83 views

Simulation of Circular plate vibrations

I'm trying to simulate the vibration of a circular plate with a free edge. The plate wave equation describes the vertical displacement of the middle surface of the plate $(\zeta)$ as a function of ...
0
votes
0answers
68 views

Problems with NMinimize

I have written some functions that take a matrix and find its minimum inner product with a specific set of vectors ...
0
votes
0answers
60 views

Trouble outputting Plot

I am trying to solve a system of ODEs and plot them with Manipulate but I keep getting blank outputs. Below is my code: ...
0
votes
0answers
51 views

Is it possible to calculate with declarations only?

simple Example: maximize $u(x), x$ solution would show constraints: $\frac{\partial u(x)}{\partial x} = 0$ $\frac{\partial^2 u(x)}{\partial x} < 0$ etc... or do I always have to explicitly ...
0
votes
0answers
82 views

How to be faster at making a frequency list of increasing steps

I want to find propabilities of having a sequence in a list, by using frequencies. The case is that you will bet on an increase when the last event had an increased and bet on derease when the last ...