Last active
December 14, 2015 20:39
-
-
Save mathsam/5145479 to your computer and use it in GitHub Desktop.
plot an ensemble of data
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function ave_Y = plot_ensemble(gamma,Y) | |
% input: gamma(N); Y(m,N) | |
% plot average shading for the N experiments | |
% return the mean | |
alpha_confidence = 0.1; % significance level | |
if length(gamma) ~= size(Y,2) | |
error('Y has the wrong size'); | |
return | |
end | |
[muhat,sigmahat,muci,sigmaci] = normfit(Y,alpha_confidence); | |
fill(vertcat(gamma(:),flipud(gamma(:))),... | |
vertcat(muci(2,:)',flipud(muci(1,:)')),'r','LineStyle','none'); | |
ave_Y = muhat; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment