I don't see nothing wrong in the result you get. The result is correct also "'by looking" at time-y_sigma graph. My guesses:
- Are your data correct?
- you got sigma^2, but maybe you should write
sigma = sqrt(trapz(time,y_sigma)) % 5.7130
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!