reproducting a code( m-file)
1 次查看(过去 30 天)
显示 更早的评论
hi This function will generate a normal distribution conditional by bounds:
http://www.mathworks.com/matlabcentral/fileexchange/23832-truncated-gaussian
i want to make this changes in above code>>>what should i do???in which line it should be???
sigma = 147.65; range = [450 800]; peakpos = 620;
[X meaneff sigmaeff] = TruncatedGaussian(-sigma, range-peakpos, [1 1e6]); X = peakpos+X; meaneff = peakpos+meaneff;
stdX=std(X); fprintf('mean(X)=%g, estimated=%g\n',meaneff, mean(X)) fprintf('sigma=%g, effective=%g, estimated=%g\n', sigma, sigmaeff, stdX) hist(X,64)
回答(1 个)
Walter Roberson
2011-3-4
I don't see anything in Bruno's code that would need to be changed. You are just calling Bruno's function, so just the lines you show into a .m file and run the file.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Descriptive Statistics and Visualization 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!