Manas SharmaPhD researcher at Friedrich-Schiller University Jena, Germany. I’m a physicist specializing in theoretical, computational and experimental condensed matter physics. I like to…

## Determinant of the Hilbert Matrix – C PROGRAM

I have recently written a post that calculates the determinant of a given square matrix using the Gaussian elimination technique. In the last…

## Chi Square Minimization using initial guesses – C PROGRAM

Method # 1: Chi-square minimization Fitting a dataset (xi,yi,si) using a curve y=f(x)=a*exp(bx), where values of the parameters a and b are unknown,…

## Calculating Value of Pi using Monte Carlo Technique – C PROGRAM

Recently in my Numerical Techniques class I learnt a Monte Carlo technique to calculate the value of Pi . The procedure is really…

## Central Limit Theorem Demonstration – C PROGRAM

One of the fundamental theorems of probability is the Central Limit Theorem. This theorem says that if Sn is the sum of n…

## Acceptance-Rejection Method (Rejection Sampling) for generating distributions- C PROGRAM

Acceptance-Rejection method can be used to produce random numbers following a certain probability density function. This is done by generating random numbers following…

## Polynomial Fitting – C PROGRAM

Okay, so here I am sharing a code for fitting a polynomial to a given set of data-points using the Least Squares Approximation Method(Wikipedia).…

## Exponential Fitting – C PROGRAM

In this post I will be showing you how to write a code that fits the data-points to an exponential function, like: where,…