cdalitz
  • Member for 2 years, 8 months
  • Last seen this week
1 answers
6 votes
203 views
Numerical computation of two-sided (bilateral) Laplace transform
Accepted answer
6 votes

With the substitution $y=x+t$, the $t$-dependency can be factored out: $$I(t)=\int_{-\infty}^\infty e^{-(y-t)}F(y)\;dy = e^t \int_{-\infty}^\infty e^{-y}F(y)\;dy = C\cdot e^t$$ This still leaves ...

View answer
1 answers
4 votes
94 views
Can you compare integer part of two fractions without division?
5 votes

A necessary condition for $\lfloor a/b\rfloor = \lfloor c/d\rfloor$ is $|ad-bc| < db$. This is not sufficient however, so if this test yields true (or if one of the multiplications overflows), you ...

View answer
1 answers
1 votes
106 views
Evaluating an indefinite integral that has no closed form
4 votes

This integral has a closed analytic solution. The trick is to write $$\frac{1}{x^3+ ax + 2a} = \frac{A}{x-x_1} + \frac{B}{x-x_2} + \frac{C}{x-x_3}$$ by a method called partial fraction decomposition. ...

View answer
3 answers
0 votes
237 views
TXT vs Binary, who's lighter?
2 votes

If file size is an issue, you can use the zlib library functions gzopen, gzwrite, gzread, and gzclose to directly write and read the text to a compressed file. Apart from possibly saving even more ...

View answer
1 answers
4 votes
124 views
Comparing Two Matrix Notation
Accepted answer
2 votes

You are looking for Chamfer-Matching: it will yield a zero value at all center points where the pattern occurs. Ordinary template matching (aka cross correlation) does not work in your case, because ...

View answer
1 answers
2 votes
163 views
Which statistical method should I use for comparing machine run-time of two algorithms?
Accepted answer
2 votes

This is a typical use case for a paired t-test. The idea is to consider only the runtime difference $\Delta t$ for each problem and test for the null hypothesis $E(\Delta t)=0$. For a step-by-step ...

View answer
2 answers
0 votes
202 views
Ordering points from X Y coordinates
2 votes

This is the classic contour tracking problem, which is usually sovled with an algorithm by Pavlidis described in Pavlidis: Algorithms for Grapics and Image Processing. pp. 129-165, Springer, 1982 ...

View answer
1 answers
0 votes
67 views
Calculating residue of a rational function
Accepted answer
1 votes

Instead of hard coding all cases with a switch clause, you can parametrize the function by its poles: double residue(size_t i, const std::vector<double> &poles) { double res = 1.0; for (...

View answer
1 answers
2 votes
59 views
Using linear regression to find the ideal point given a set of trajectory's data
1 votes

For the pendulum, the following equations hold: $$\sin\varphi = \frac{x-x_0}{l}\quad\mbox{and}\quad \cos\varphi=\frac{l-(y-y_0)}{l}$$ where $l$ is the pendulum length, $\varphi$ is the angle of the ...

View answer
1 answers
1 votes
116 views
Spline regularization
1 votes

As your problem is a local regression problem, I would not use a spline fit, but LO(W)ESS. This estimates $f(x)$ at a sample point $x$ by a weighted least squares fit to the points $x_i$ that are the $...

View answer
1 answers
7 votes
149 views
Numerically estimating expected value of f(x) when x is normally distributed
Accepted answer
1 votes

Please have a look at the answers to this question on CrossValidated. There you can find a worked out solution (including R-code) based on Gauss-Hermite quadrature, which is especially designed for ...

View answer
1 answers
6 votes
391 views
Is resampling more accurate than block average for statistical analysis of data?
Accepted answer
1 votes

I guess that you are not actually interested in the variance, but in a confidence interval for your observable $\theta$. It should be noted that computing the confidence interval from the variance (i....

View answer
2 answers
5 votes
2k views
Algorithms to extract trajectory lines out of 3D point clouds
1 votes

When the points belong to more than one curve, it will first be necessary to cluster them into curves. A possible approach is described together with a reference implementation in Dalitz, Wilberg, ...

View answer
2 answers
2 votes
150 views
Accelerating convergence of a generalized continued fraction
0 votes

According to Theorem 4.7 in the 2016 Continued Fractions course notes by Gautam Gopal Krishnan, a continued fraction $a_0 + \frac{1}{a_1+}\frac{1}{a_2+}\ldots$ can be rewritten as a series: $$a_0 + \...

View answer
3 answers
2 votes
284 views
Clustering with points lying along different 3D planes
0 votes

Like rchilton1980, I would suggest the Hough transform. In your case, d does not to be quantized because it is known to be zero. When quantizing the two angles, beware that the naive quantization ($\...

View answer