how do I fill between 3 lines?
Show older comments
b = 48
time = 0:1:40000;
mFast = 6/30
mSlow = 4.3/30
yFast = (mFast*time)+b
ySlow = (mSlow*time)+b
plot(time,yFast);
xlabel("Time(Minutes)")
ylabel("growth in numbers")
title("Tribble Growth Rate")
legend("Harvester")
hold on
plot(time,ySlow,"DisplayName","Triple Triticale ")
ycutoff=time * 0 +5000
plot(time,ycutoff)
%i need to fill between the 3 lines thats given and need some help%
1 Comment
Walter Roberson
on 28 Sep 2023
I would recommend first calculating the points of intersection between the lines and ycuttoff . Doing so would allow you to calculate the coordinates of the 3 vertices of the triangle, and then you can fill using the coordinates.
Accepted Answer
More Answers (0)
Categories
Find more on Vector Fields in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
