plot curve with error bars
조회 수: 2 (최근 30일)
이전 댓글 표시
I have two vectors,how can i calculate the standard deviation for each element so i can plot the error bars in the curve.
thank you
댓글 수: 0
채택된 답변
Star Strider
2017년 6월 7일
One approach:
x = 1:10; % Create Data (Independent Variable)
V1 = randn(1, 10); % Create Data (Row Vectors)
V2 = randn(1, 10);
V12_sd = std([V1; V2]); % Standard Deviation
V12_mean = mean([V1; V2]); % Mean
figure(1)
errorbar(x, V12_mean, V12_sd)
grid
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Bar Plots에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!