MATLAB: How Can I modify the fill command

fill

Is there another MATLAB command like fill. If I utilize this command the output is not what I'm looking for. I want the area inside these coordinates value.
fill(coord_x, coord_y, 'r')
The code connects the points not in the way I want. Is there any other command?

Best Answer

Maybe your coordinates are not correct. Look at this example
fill([0 1 1 0 0],[0 0 1 1 0],'r')
xlim([-2 2])