createPolygonInFigu​re(numSides,vertexM​arker)

版本 1.0.0.0 (1.9 KB) 作者: Sugato
This function creates a polygon on top of any figure window.
16.0 次下载
更新时间 2017/8/12

查看许可证

Function Description
This function creates a polygon on top of any figure window.

AUTHOR: Sugato Ray | Created on: 10-FEB-2017 | ray.sugato[at]gmail.com

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
PLEASE ACKNOWLEDGE THE AUTHOR IF YOU USE THIS CODE
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

INPUT:
numSides = number of sides to the polygon
vertexMarker = a string to mark the vertices. For example: 'o'

OUTPUT:
p = a structure array with the information on
vertex >> p.vertex
figure >> p.figure
axis >> p.axis

EXAMPLE:
p = createPolygonInFigure(numSides,vertexMarker);
p = createPolygonInFigure(numSides,'o');
p = createPolygonInFigure(numSides);
p = createPolygonInFigure(4); % Quadrilateral w/o marking the vertices
p = createPolygonInFigure(4,'o'); % With vertices marked by 'o'

引用格式

Sugato (2025). createPolygonInFigure(numSides,vertexMarker) (https://www.mathworks.com/matlabcentral/fileexchange/64104-createpolygoninfigure-numsides-vertexmarker), MATLAB Central File Exchange. 检索时间: .

MATLAB 版本兼容性
创建方式 R2016a
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Elementary Polygons 的更多信息

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
1.0.0.0