Poly2mask, drawpolygon or patch - MATLAB Cody - MATLAB Central

Problem 52854. Poly2mask, drawpolygon or patch

Difficulty:Rate
Recently, I tried to plot a polygon in matlab, and I found there is a lot of embedded function that can be used. However, some functions will plot points at vertexes, it is really disgusting. Try to use different embedded functions given in the title and find their difference!
vertexes coordinates is given as follow:
x = [0 1 1 0];
y = [0 0 1 1];
Tips: patch is the answer!

Solution Stats

26.15% Correct | 73.85% Incorrect
Last Solution submitted on Apr 14, 2025

Problem Comments

Solution Comments

Show comments
Registration Now Open for MathWorks AUTOMOTIVE CONFERENCE 2025
...
Hello Community, We're excited to announce that registration is now open for the...

Problem Recent Solvers17

Suggested Problems

Problem Tags

Community Treasure Hunt

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

Start Hunting!
Go to top of page