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

learn more… | top users | synonyms

25
votes
0answers
554 views

Performance problems in new Sequence functions

The new-in-10.1 Sequence* family of functions should provide newly optimized methods for handling sequence problems. Happily in some cases they do! For example ...
22
votes
0answers
312 views

Is FullGraphics an abandoned function? Is there an alternative?

FullGraphics hasn't worked entirely for a long time and the situation appears to be getting worse instead of better. In Mathematica 10.0 and 10.1 a simple usage ...
18
votes
0answers
386 views

More Ticks::ticks errors in AbsoluteOptions in v10

Bug introduced in 7.0 or earlier and persisting through 10.4 or later While the specific bug affecting Plot described in AbsoluteOptions prints error messages in ...
12
votes
0answers
313 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 ...
9
votes
0answers
108 views

Possible Bug in LinearSolveFunction with Sparse Vectors

Bug introduced in 5.0 and persists through 10.4.1 LinearSolveFunction is new in 5.0 Consider the following set of equations and corresponding variables: ...
8
votes
0answers
84 views

Slot number cannot be filled

I got a strange message with the derivative of a two-argument function defined by a definite integral. For example if "f" is defined as: ...
6
votes
0answers
49 views

Is it better to completely forget about the existence of PowersRepresentations?

I noticed that in several cases the performance of PowersRepresentations is hugely worse than that of IntegerPartitions. (Mma ...
6
votes
0answers
50 views

KeyIntersection fails (?) when an association is empty

I think I found a bug in KeyIntersection (Mma 10.2). To illustrate, input the following: ...
6
votes
0answers
74 views

How to instruct MatrixLog to work with singular matrices?

How to instruct MatrixLog to work with singular matrices by ignoring the zero eigenvalues (thus only acting on a subspace orthogonal to the matrix kernel)? I'm ...
6
votes
0answers
122 views

What is the difference between GenerateDocument and TemplateApply[NotebookTemplate[

Bug introduced in V10.0 and persisting through V10.4 Since V10.3 the bug still remains but additionally the Genarate and ...
5
votes
0answers
196 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
87 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
64 views

RealDigits and functional style

So while thinking about Replacing numbers of which you only know certain digits I have faced, again, a problem that I find hard to extract from RealDigits' output ...
4
votes
0answers
52 views

How to know the string data/settings, of some options/functions

It is known that several functions and options take some sort of input in this form: option->"something" function["something"] The simple example for this is ...
4
votes
0answers
93 views

Why does FromDigits transpose its argument (sometimes)?

a = {{1, 2}, {3, 4}, {5, 6}} ; FromDigits /@ Transpose@ a == FromDigits @ a (* True *) The only "strange" syntax I've found in the docs is But it doesn't ...
4
votes
0answers
88 views

Using an external Pattern breaks Format

I noted while writing this answer that using an external Pattern on Format doesn't work: ...
4
votes
0answers
237 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
117 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
122 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
64 views

Accuracy of PrimeQ function

Using PrimeQ in Mathematica 10 on integers up to $2\cdot 10^{5717}$ the function appears to work. The Documentation for Mathematica 5 says that ...
3
votes
0answers
31 views
3
votes
0answers
65 views

The implementation of FunctionRange

How exactly does the FunctionRange work? What kind of algorithm does it use? I looked it up in the manual but it doesn't provide any references or even a name of ...
3
votes
0answers
54 views

Monitor CUDA function

Is there a way to monitor CUDA function without bringing much performance reduction. For example, Map can be monitored by ...
3
votes
0answers
85 views

Is there a documentation generator for Mathematica?

I'm looking for a way to document the functions of my packages inline, preferably inside comments. There should be a Doxygen type tool for this that takes comments and that generates html from markup ...
3
votes
0answers
159 views

Extracting an equation from an interpolated function

Im trying to use LibraryLink to do some calculations in C but part of the expression i want to calculate is an Interpolating Function. C cant use that obviously so I'm trying to shift it to a data ...
3
votes
0answers
68 views

Lists for built-in functions that can work without brackets

I just noticed that Exit and Quit can work without brackets i.e. a single Exit or ...
3
votes
0answers
248 views

Distance Time Warp (DTW) function implementation in mathematica

The DTW (Distance time warp) is given here http://en.wikipedia.org/wiki/Dynamic_time_warping There is an implementation of DTW in R as well as MATLAB. However i am unable to find something for DTW in ...
3
votes
0answers
153 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)$$
3
votes
0answers
71 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 ...
3
votes
0answers
491 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 ...
3
votes
0answers
190 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
96 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
237 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
117 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
66 views

Function output

I would like a function that computes Cartesian product of two sets z=(Tuples@{#1,#2}), and computes the number of elements in this set(list) ...
2
votes
0answers
113 views

Input List of Images into a cloud deployed API function

I'm new to APIFunction and CloudDeploy, but essentially, here's my situation: I have a function (let's call it ...
2
votes
0answers
60 views

Covariance matrix estimation when number of variables is larger than number of observations

It is well known that the sample covariance matrix estimator results in a singular matrix if the variables is larger than the number of observations. One solution is to apply shrinkage estimators. ...
2
votes
0answers
47 views

Computing an inexact derivative with some terms preserved in exact form

I am beginning to learn Mathematica and have the following question: How can I return a derivative with exact numbers instead of one involving numerical approximations? My original, single variable ...
2
votes
0answers
65 views

Marginal distribution with weight

Given a multi-variate distribution $P(\mathbf{x},\mathbf{y})$, I would like to obtain the marginal distribution $$P_m(\mathbf{x})=\sum\int_{\mathbf{y}}P(\mathbf{x},\mathbf{y})W(\mathbf{y})$$ In my ...
2
votes
0answers
85 views

Construct single InterpolatingFunction from a mathematical combination of other IF's

Let's say I have an interpolated function f, like I might get as the solution to an NDSolve: ...
2
votes
0answers
106 views

Incorrect output from InverseFourierTransform

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 ...
2
votes
0answers
212 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: ...
2
votes
0answers
262 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
107 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
99 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 ...
2
votes
0answers
123 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
1k 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 ...
2
votes
0answers
72 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
60 views

Panel size undesired behaviour

This is next question from the series: better avoid Panel if you care about details. previous about FrameMargins In the ...