finite Mixture of exponential in matlab

#1
Hi all
can any body here help me with ((finite Mixture of exponential in matlab))

I want to simulate it in matlab or R for any given data ?