Tuesday, February 28, 2006

 

Discrete Event Simulation

Making a simultion program with discrete event I've found this page

I'll dicsuus this more later.

Thursday, February 23, 2006

 

Get Exponential RV from Uniform one

I was required to get a Exponential RV from Uniform One and I have found this equation

E=-log(U)*lamda

where U is the uniform RV and E is the Exponential RV,and lamda is the 1/(mean of the exponential rv) to get more info about Exponential RV check here.

For the C code
#include < stdlib.h >
#include < math.h >
float exp(float lamda)
{
return (-log10(Rand())*lamda);
}


This page is powered by Blogger. Isn't yours?