Lets suppose I have n curves, which together enclose some region. How to plot the curves and fill in the region they enclose using Octave/Matlab? Below is example for 3 curves (enclosed area is in black):
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
You can use the function fill
.
See the matlab documentation there:
http://www.mathworks.fr/help/techdoc/ref/fill.html
回答2:
I used the fill and flipr functions in matlab to shade the area between two curves:
fill( [x fliplr(x)], [upper fliplr(lower)], 'c', 'EdgeColor','none'), where x = (1:100)
and 'upper' and 'lower' are variables representing my two traces.
I received help from this post: MATLAB, Filling in the area between two sets of data, lines in one figure