MATLAB Answers

Coloring with coordinates.

조회 수: 1(최근 30일)
Kimhim Chhay
Kimhim Chhay 19 Nov 2019
Commented: Kimhim Chhay 21 Nov 2019
Hi I have a some x data with upper and lower y data and wanted to color the enclosed section that is made.
Here is the code so far.
x_data = [3/8 4 8 16 30 50 100];
uppery = [100 100 100 85 60 30 10];
lowery = [100 95 80 50 25 5 0];
semilogx(x_data, uppery, x_data, lowery);

채택된 답변

KSSV
KSSV 20 Nov 2019
KSSV 님이 편집함. 20 Nov 2019
x_data = [3/8 4 8 16 30 50 100];
uppery = [100 100 100 85 60 30 10];
lowery = [100 95 80 50 25 5 0];
x = [x_data fliplr(x_data)] ;
y = [uppery fliplr(lowery)] ;
semilogx(x,y);
hold on
fill(10.^log10(x),y,'y')

  댓글 수: 1

Kimhim Chhay
Kimhim Chhay 21 Nov 2019
Thnak you.

로그인 to comment.

More Answers (0)

이 질문에 답변하려면 로그인을(를) 수행하십시오.


Translated by