How to generate samples from a modified exponential density?
이전 댓글 표시
Hi everyone, The standard form of an exponential density is f(x|lambda)= lambda*exp(-x/lambda) if x>=0 and f(x|lambda)=0 if x<0.
I want to generate samples from the following density f(x|lambda, b)= lambda*exp(-(x-b)/lambda) if x>b and f(x|lambda,b)=0 if x<=b. Where b is a user-specified parameter.
Can anyone here suggest me how to do this ?
Best regards,
채택된 답변
추가 답변 (1개)
Shashank Prasanna
2014년 6월 9일
편집: Shashank Prasanna
2014년 6월 9일
0 개 추천
You can generate uniform random numbers using the rand function and apply it to your modified density function.
카테고리
도움말 센터 및 File Exchange에서 Random Number Generation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!