Plot AREA limit in matlab

1 vue (au cours des 30 derniers jours)
Giovanni Gardan
Giovanni Gardan le 6 Août 2020
I have two vectors (n and abb_per) and I'd like to make an area plot. I'd like to make the upper limit of the graphic as 100 (and not the bigger number of abb_per).
I tried to use the command axis but doesn't work. How could I do?
n = [18 19 39 60 130 797 2060];
ren = [0.081423 0.098465 0.09714 0.139722 0.174535 1.196584 2.731867];
gar = [0.03305 0.034039 0.033889 0.040322 0.032641 0.13198 1.0767];
abb_per = ((ren-gar)./ren)'*100;
area(n,abb_per)
axis[(0 2060 0 100)]

Réponse acceptée

Star Strider
Star Strider le 6 Août 2020
If you want the area between ‘abb_per’ and 100 filled, use the patch function.
Try this:
figure
patch([n fliplr(n)],[abb_per; ones(size(abb_per))*100].','b')
producing:
.

Plus de réponses (0)

Catégories

En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by