matlab语法x=get(h,'xdata');中各个字符的含义是什么?
1个回答
展开全部
get函数是获得消渣某一个对象的属性。例如
x=rand(10);
y=rand(10);
h=plot(x,y);
get(h)
DisplayName: ''
Annotation: [1x1 hg.Annotation]
Color: [0 0 1]
LineStyle: '-'
LineWidth: 0.5000
Marker: 'none'
MarkerSize: 6
MarkerEdgeColor: 'auto'
MarkerFaceColor: 'none'
XData: [1x5000 double]
YData: [1x5000 double]
ZData: [1x0 double]
BeingDeleted: 'off'
ButtonDownFcn: []
Children: [0x1 double]
Clipping: 'on'
CreateFcn: []
DeleteFcn: []
BusyAction: 'queue'
HandleVisibility: 'on'
HitTest: 'on'
Interruptible: 'on'
Selected: 'off'
SelectionHighlight: 'on'
Tag: '兄物'
Type: 'line'
UIContextMenu: []
UserData: []
Visible: 'on'
Parent: 175.0050
XDataMode: 'manual'
XDataSource: ''
YDataSource: ''
ZDataSource: ''
就可以获拿尘悄取相属性值了,同理可以通过set函数对以上属性值进行设置。
x=rand(10);
y=rand(10);
h=plot(x,y);
get(h)
DisplayName: ''
Annotation: [1x1 hg.Annotation]
Color: [0 0 1]
LineStyle: '-'
LineWidth: 0.5000
Marker: 'none'
MarkerSize: 6
MarkerEdgeColor: 'auto'
MarkerFaceColor: 'none'
XData: [1x5000 double]
YData: [1x5000 double]
ZData: [1x0 double]
BeingDeleted: 'off'
ButtonDownFcn: []
Children: [0x1 double]
Clipping: 'on'
CreateFcn: []
DeleteFcn: []
BusyAction: 'queue'
HandleVisibility: 'on'
HitTest: 'on'
Interruptible: 'on'
Selected: 'off'
SelectionHighlight: 'on'
Tag: '兄物'
Type: 'line'
UIContextMenu: []
UserData: []
Visible: 'on'
Parent: 175.0050
XDataMode: 'manual'
XDataSource: ''
YDataSource: ''
ZDataSource: ''
就可以获拿尘悄取相属性值了,同理可以通过set函数对以上属性值进行设置。
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询