WAY too much code and too little background...what do you mean by "calculate [an] error bar in vertical axis"? There's
doc errorbar
that will plot error bars on a graphic given the error value or upper/lower limits desired....what else do you need?
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!