Search code examples
matlaboctavelinesfillregion

Plot and fill area enclosed by n lines using Octave\Matlab


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): enter image description here


Solution

  • You can use the function fill.

    See the matlab documentation there:

    http://www.mathworks.fr/help/techdoc/ref/fill.html