File Exchange

image thumbnail

xbinavg(x, y, xedge, medopt)

version (1.27 KB) by Ryosuke F Takeuchi
export mean y-value via x-value bin


Updated 03 Dec 2016

View License

Simple function for summarizing a large number of 2d-data.
Calculating mean and standard deviation of y-datas within each bin of x-data.
Example code:
x = rand(1,1280)*100;
y = x.^2 + 5000*randn(size(x));
[meanv, stdv, xv, nv] = xbinavg(x, y, 0:10:100, true);
scatter(x,y, [], [.8 .8 .8], '.');
hold on;
errorbar(xv,meanv,stdv, 'k','LineWidth', 5/2)

Cite As

Ryosuke F Takeuchi (2020). xbinavg(x, y, xedge, medopt) (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (0)


update description

update comment & help doc

MATLAB Release Compatibility
Created with R2015a
Compatible with any release
Platform Compatibility
Windows macOS Linux