Notice
Recent Posts
Recent Comments
Link
«   2025/04   »
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30
Tags
more
Archives
Today
Total
관리 메뉴

자료 매번 검색하기 귀찮아서 만든 블로그

MATLAB - fill 사용하기 (band plot 그리기) 본문

Matlab

MATLAB - fill 사용하기 (band plot 그리기)

쿠키아버님 2021. 12. 27. 17:41
t=1:10;
y=rand(10,1);
plot(t,y)

 

CI = 0.5;

t_CI = [t, fliplr(t)];

y_CI = [(y-CI)', fliplr((y+CI)')];
plot(t,y)
hold on
fill(t_CI, y_CI, 1)

 

색상, 투명도, 선 색깔 지정

plot(t,y)
hold on
fill(t_CI, y_CI, 1, 'facecolor', 'red', 'edgecolor', 'none', 'facealpha', 0.25)