Beside the beta indicated by Roger, you might be interested in another continuous distribution, as indicated in my comment from Aug 26th of this FEX
http://www.mathworks.com/matlabcentral/fileexchange/23832truncatedgaussian
% Save this function in a file:
function deltamean = meanTG(xbar, meantarget, stdtarget, range)
[~, meaneffective] = TruncatedGaussian(stdtarget, rangexbar, 0);
deltamean = meantarget  (meaneffective + xbar);
end % meanTG
%%%%%%%%%%%%%%%
% Call fzero
meantarget = 0.2;
stdtarget = 0.5;
range = [1 1];
xbarstart = 0; % might require to be adjusted depending on mean and std
xbar = fzero(@(xbar) meanTG(xbar, meantarget, stdtarget, range), xbarstart)
% Create a shift TrunccatedGaussian
X = xbar + TruncatedGaussian(stdtarget, rangexbar, [1 1e6]);
% Check
fprintf('mean(X) = %f\n', mean(X));
fprintf('std(X) = %f\n', std(X));
fprintf('min(X) = %f\n', min(X));
fprintf('max(X) = %f\n', max(X));
hist(X)
% Bruno
