Shade area between two curves
86 次查看(过去 30 天)
显示 更早的评论
Hello,
I'm trying to fill the area between these two curves:
I have tried to use the jbfill.m function and to create a poligon for filling it without succes:
Any idea on how to fix the problem?
Thank you in advance for your help! (ps: I attach the .mat files of x and upper and lower curves)
0 个评论
采纳的回答
Simon Chan
2021-8-14
Use function fill
clear; clc;
load('xdata1.mat');
load('up.mat');
load('low.mat');
coord_up = [xdata1,up];
coord_low = [xdata1,low];
coord_combine = [coord_up;flipud(coord_low)];
fill(coord_combine(:,1),coord_combine(:,2),'b')
更多回答(2 个)
Image Analyst
2021-8-14
See the FAQ, not only for this very FAQQY question but for lots of other good information too:
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Polygons 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!