Linked Questions

1
vote
1answer
123 views

Why doesn't Compile work on the Permutations function with second arguments?

Here is a narrowed-down example, the first case works, but the second one refuses to use the compiled version: ...
0
votes
1answer
291 views

Compiling function solving for the smallest eigenvalue of a matrix

I am trying to speed up my code, which many times finds a lowest eigenvalue of a Hermitian (symmetric, real) matrix. Using a small 2x2 matrix as an example, this works: ...
0
votes
1answer
108 views

Why does Compile redo the calculation when overflow happens?

When implementing the Numerov method solving Schrodinger equation, I encountered this problem. In order to show the order of the evaluation, Print is added. ...
0
votes
1answer
212 views

Correct use of Solve inside Compile

I have a function that behaves itself, but I want to make it much faster so I tried to put it into a compilable form After much fiddling I can't get it to work. Here's one of my failed attempts: <...
0
votes
1answer
135 views

How to compile gather? [duplicate]

First question,How to Compile this? gather[data_]:=Gather[data, Mod[#1, 3] == Mod[#2, 3] &] I dont know why this is wrong. ...
0
votes
1answer
318 views

How to return the rhs of a transformation rule from within Compile[]

I have defined the following function: ...
0
votes
1answer
322 views

Alleviating a bottleneck involving a function call with symbolic derivatives

I have a bottleneck problem involving a function call with symbolic derivatives. I don't have much experience with Mathematica (or any dynamic language) and I'm certain that the way I've set this up ...
6
votes
0answers
146 views

Possible Compile bug

Bug introduced in 11.3 or earlier The program: ...
5
votes
0answers
128 views

Optimize Use of PeakDetect in Mathematica

I am quite new to Mathematica and I am looking for some advice in order to improve and optimize my code. Here is what I am trying to do: Open a stream Read the stream line by line and store it in "...
5
votes
0answers
90 views

Random number generation within Compile and Parallelization->True

According to this thread RandomChoice is a compilable function. I use it to generate random numbers in a compiled function with parallelization enabled. I wrote ...
4
votes
0answers
291 views

Is it possible to Compile the function with string argument? [duplicate]

As we can see from the Compile documentation, the typical arguments for Compile should be ...
3
votes
0answers
78 views

What are the recommended best practices for and common pitfalls of using Compile? [duplicate]

As evidenced in my last question there is much I do not know about how to write compilable functions. The basics are clear: one must load the appropriate packages ...
3
votes
0answers
56 views

Speeding up MovingMap of Dot

I have the following code (showing an insignificant simplification) that I really need to run many times for different ps (its length can be 10^7 or so) and wSize. Is there a way to speed this up ...
3
votes
0answers
71 views

Is there something more efficient than For to solve thousands of similar numerical calculations? [closed]

I have a really big vector (nearly 30,000 elements) called x and am trying to numerically find the root of a function where one of the parameters successively takes each value stored in the vector. At ...
3
votes
0answers
514 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 ...

15 30 50 per page
1
2
3 4 5
9