Adding error bars to a plot

조회 수: 56 (최근 30일)
Samuele Bolotta
Samuele Bolotta 2021년 7월 20일
답변: Star Strider 2021년 7월 20일
I created six plots. Each of this plot is created from a 4x3 matrix. The 12 values in this matrix are averages. Is there a way to add another 4x3 matrix for each plot, which contains the 12 standard deviations so that I can add error bars?
Thanks!

답변 (1개)

Star Strider
Star Strider 2021년 7월 20일
I do not understand what you want to do, although that is definitely possible.
Examples —
y = rand(4,3)*10;
err = rand(4,3)/5;
figure
errorbar(y, err)
grid
xlim([0 5])
figure
errorbar(y.', err.')
grid
xlim([0 4])
.

카테고리

Help CenterFile Exchange에서 Line Plots에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by