This tag is intended for the review and improvement of style for already functioning code. It not meant to change the objective of the code.

learn more… | top users | synonyms

16
votes
0answers
636 views

Fast Spherical Harmonics radiative transfer

This is a rather specific question and I apologize for spamming you with some lengthy code. But it could be interesting for some reader and maybe you can help out, so please bear with me. I am using ...
10
votes
0answers
98 views

Segmentation of sunspots

I recently went for a walk with my camera and snapped a few pictures of the sun. The pictures didn't turn out too well, but this was to be expected without a telescope. I thought it might be a nice ...
1
vote
0answers
38 views

Fine tuning compiled code that computes dilogarithm function

As an exercise of writing a good Compile function, I want to do the simple task of coding a routine that outputs the real part of the dilogarithm function ...
1
vote
0answers
114 views

Nonlinear FEM and FindRoot

I'm trying to develop a kind of nonlinear FEM application using mathematica to solve a bvp like the following: $$ \gamma(u') ~u^{iv} + 2 \gamma'(u') u''' u''+ u''^3 = f(x) $$ where $u = ...
1
vote
0answers
111 views

How to tweak the following purely numerical code

I am using the following numerical function in my program and I would like to speed it up. ...
1
vote
0answers
125 views

Runge-Kutta-2 on System

After spending some time using the Mathematica documentation and this Mathematica.SE answer, I implemented the Runge-Kutta-2 routines. I am hoping someone can validate what I did and tell me that it ...
0
votes
0answers
98 views

Constrained maximum likelihood

Trying to solve a MLE with nonlinear constraints that need to be satisfied. However, the given solution do not match the constraints. Am I doing it correctly? ...
0
votes
0answers
146 views

Code performance problem

Could anyone help me with the attached code? How would you speed up my attached code in some degree? Your comments are highly welcome. ...
0
votes
0answers
60 views

how to generate repeatable Unique streams?

I need to label some data in arbitrarily nested ragged lists, with a stream of unique labels. It's very convenient if the labels are consecutive integers, starting at 0 or 1, and if I can produce the ...