Linked Questions

3
votes
1answer
619 views

How do I format Compile[] correctly?

My Mathematica skill is still rusty, so kindly bear with me. I'm having problem formatting expression to compile the function correctly: $\sum _{g=1}^G \sum _{n=1}...
3
votes
1answer
319 views

Why is my compiled code slower?

I am trying to make a Mathematica program run faster. Here is part of the original version. It takes as input the integers X (of order 100), J (of order 10000), and n (of order 100), the real number p ...
2
votes
1answer
101 views

LeastSquares vs ArgMin

From the documentation, we learn that: LeastSquares[m,b], when b is a vector, is equivalent to ...
2
votes
1answer
147 views

Compiling a summation

I have a sum over Legendre polynomials which I'm trying to speed up. I've come across the suggestion of using Compile to speed up code in previous answers around ...
2
votes
1answer
355 views

Compile a MeijerG function [duplicate]

I am not very experienced with Compile, I tried to use it for a Meijer-G function ...
2
votes
1answer
193 views

Apply functions to functions yields slow execution speed

I'm trying to write a function that parametrizes a curve c(t) by its arc length. Technicly I'm finished but if I plot the result for an example curve like ...
2
votes
1answer
84 views

About Compile Function

I have a function that take p as a parameter, p is a 2X3X3 list, ( a 2X3X3 list can like { {{2,3},{1,2.},{1,1.}}, {{2,3.},{1,2},{1,1}}, {{2,3},{1,2},{1,1}} } ) the function just as: ...
2
votes
1answer
275 views

Mathematica Compiled Functions - additional functions

Mathematica supports an exact list of compilable functions: They are listed here: List of compilable functions. However, I would need to add the following functions: ToExpression, StringFreeQ, ...
2
votes
1answer
369 views

how to Compile user-defined function like this

the following function can be compiled successfully ...
2
votes
1answer
319 views

How to get the results of Tally split into two separate lists

This is a kind of a followup to my previous question. I am starting with a long list of plane coordinates, like this one: ...
1
vote
1answer
64 views

Pick inside Compile

I want to compile this function: ...
1
vote
1answer
288 views

Compiling If statement

I'm tring to use Compile in the following code, but it gives me an error message that I don't understand: ...
1
vote
1answer
555 views

Use Compile to speed up evaluation

I have read, that using Compile command can speed up evaluations in mathematica. I have a mathematical expression, which I evaluate using following command: ...
1
vote
1answer
158 views

Efficient calculation of diagonal matrix elements

I have a matrix $V$ of size $M$ in which each row $i$ is a vector $v_i$. Now I have another matrix $H$ and I would like to calculate as efficiently as possible the list of values $v_i^\dagger\cdot H\...
1
vote
1answer
2k views

CompiledFunction::cfse: "Compiled expression X should be a machine-size integer

I am trying to use a compiled function in order to save time... LegrendeTransform = Compile[{y}, MaxValue[Sin[x] - x *y , x]] Now I want to to evaluate and ...

15 30 50 per page
1 2
3
4 5
9