how to color in between curves the two graphs?

4 Ansichten (letzte 30 Tage)
KOTTEASWARAN V
KOTTEASWARAN V am 28 Feb. 2021
Beantwortet: Star Strider am 28 Feb. 2021

Antworten (1)

Star Strider
Star Strider am 28 Feb. 2021
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
.

Kategorien

Mehr zu Specifying Target for Graphics Output finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by