how to color in between curves the two graphs?

조회 수: 2 (최근 30일)
KOTTEASWARAN V
KOTTEASWARAN V 2021년 2월 28일
답변: Star Strider 2021년 2월 28일

답변 (1개)

Star Strider
Star Strider 2021년 2월 28일
It’s not possible to run images of code, especially images of incomplete code.
Try this example:
x1 = linspace(-0.1, -10, 35);
y1 = 10./x1;
x2 = linspace(-0.1, -10, 30);
y2 = 15./x2;
figure
plot(x1, y1)
axis([-10 10 -10 10])
hold on
plot(x2, y2)
fill([x1 fliplr(x2)], [y1 fliplr(y2)],'g')
plot([0 0], ylim, '-k')
plot(xlim, [0 0], '-k')
hold off
.

카테고리

Help CenterFile Exchange에서 Specifying Target for Graphics Output에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by