Plot MAT LAB中图形文件数据点的提取
我已导入一个形状文件,并将其另存为MAT LAB地物文件。我需要沿着图形文件的边界提取数据点作为(x,y)坐标。有人能帮我吗 这取决于您的体形(2D图像、3D图像、图表等)。 您可以通过此命令读取fig文件Plot MAT LAB中图形文件数据点的提取,plot,matlab-figure,Plot,Matlab Figure,我已导入一个形状文件,并将其另存为MAT LAB地物文件。我需要沿着图形文件的边界提取数据点作为(x,y)坐标。有人能帮我吗 这取决于您的体形(2D图像、3D图像、图表等)。 您可以通过此命令读取fig文件 >> figFile = load('1.fig','-mat') figFile = hgS_070000: [1x1 struct] after that you can find all data in this structure by using dot
>> figFile = load('1.fig','-mat')
figFile =
hgS_070000: [1x1 struct]
after that you can find all data in this structure by using dot
>> figFile.hgS_070000
ans =
type: 'figure'
handle: 1
properties: [1x1 struct]
children: [1x1 struct]
special: []
>> figFile.hgS_070000.children
ans =
type: 'axes'
handle: 176.08251953125
properties: [1x1 struct]
children: [1x1 struct]
special: [4x1 double]
>> figFile.hgS_070000.children.children
ans =
type: 'graph2d.lineseries'
handle: 177.0830078125
properties: [1x1 struct]
children: []
special: []
>> figFile.hgS_070000.children.children.properties
ans =
Color: [0 0 1]
XData: [1 2 3 4 5 6 7 8 9]
YData: [2 1 5 6 4 8 8 4 8]
ApplicationData: [1x1 struct]
.
.
.
绘图数据可以通过此方法提取
>> Y = figFile.hgS_070000.children.children.properties.YData
>> X = figFile.hgS_070000.children.children.properties.XData
非常感谢。我得到的点是构成多边形的X,Y坐标,我理解进一步需要得到多边形和给定半径的圆的交点,因为我在多边形中只有一些点,我怎么能得到这些交点?你已经试过什么了?