- #1
spoonyluv
- 9
- 0
Hello,
I seriously need some help as I can't figure out what to do here. I am working on coding a vaccination simulation that measures rates of infection for period of 100 days.
I have this variable delta, which is the number of days the infection period lasts. Delta is 5, or at least on average it is 5, which means it could be occasionally be 1 day for a random individual or 3 days for some other random individual or even 7, but on average it is 5.
I have 10 individuals and run the simulation for 100 days. for each individual i need MATLAB to create a random standard deviation that is part of a normal distribution. So for example if I have a lognormal formula
R = lognrd (5, ?, 100, 10)
This formula creates a perfect matrix of 100x10 with lognormal distribution values for each cell, with 5 being the mean. The problem is with the ?, which is where the standard deviation goes. How do I get MATLAB to churn out a std dev of a normal distribution that will then feed into the R = lognrd (5, ?, 100, 10)
Thanks
I seriously need some help as I can't figure out what to do here. I am working on coding a vaccination simulation that measures rates of infection for period of 100 days.
I have this variable delta, which is the number of days the infection period lasts. Delta is 5, or at least on average it is 5, which means it could be occasionally be 1 day for a random individual or 3 days for some other random individual or even 7, but on average it is 5.
I have 10 individuals and run the simulation for 100 days. for each individual i need MATLAB to create a random standard deviation that is part of a normal distribution. So for example if I have a lognormal formula
R = lognrd (5, ?, 100, 10)
This formula creates a perfect matrix of 100x10 with lognormal distribution values for each cell, with 5 being the mean. The problem is with the ?, which is where the standard deviation goes. How do I get MATLAB to churn out a std dev of a normal distribution that will then feed into the R = lognrd (5, ?, 100, 10)
Thanks