How can I execute the level enclosed between the two required functions in the plot?

 채택된 답변

KSSV
KSSV 2022년 6월 3일
편집: KSSV 2022년 6월 3일
x = linspace(-1,2) ;
f1 = @(x) (x.^2-2*x+2) ;
f2 = @(x) -x.^2+6 ;
y1 = f1(x) ;
y2 = f2(x) ;
plot(x,y1,x,y2)

댓글 수: 2

Thank you very much for drawing this diagram, can you tell me how to color between these two diagrams with the plot command?
x = linspace(-1,2) ;
f1 = @(x) (x.^2-2*x+2) ;
f2 = @(x) -x.^2+6 ;
y1 = f1(x) ;
y2 = f2(x) ;
x = [x flip(x)] ;
y = [y1 flip(y2)] ;
patch(x,y,'r')

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Annotations에 대해 자세히 알아보기

태그

질문:

2022년 6월 3일

댓글:

2022년 6월 3일

Community Treasure Hunt

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

Start Hunting!

Translated by