How to see (in Command Window) all possible fields of a structure?

5 次查看(过去 30 天)
Let say I have an axes handle stored to "ax". How could I display all possibilities for let say ax.Units (or any other field)?
Thanks

采纳的回答

matico
matico 2015-8-16
Now I found what I want:
set(ax,'Units')

更多回答(1 个)

Image Analyst
Image Analyst 2015-8-16
This must be a homework problem because Azzi just answered it two hours ago and told the student to use the fieldnames() function. You should tag homework problems with the "homework" tag. I'll do it now for you.
  2 个评论
matico
matico 2015-8-16
No, this is not a homework. :) I saw his answer, but "fieldnames" function doesn't return what I want.
If I type:
fieldnames(ax)
I get this:
ans =
'CameraPosition'
'CameraPositionMode'
'CameraTarget'
'CameraTargetMode'
'CameraUpVector'
'CameraUpVectorMode'
'CameraViewAngle'
'CameraViewAngleMode'
'View'
'Projection'
'AmbientLightColor'
'Units'
'Position'
'OuterPosition'
'ActivePositionProperty'
'TightInset'
'DataAspectRatio'
'DataAspectRatioMode'
'PlotBoxAspectRatio'
'PlotBoxAspectRatioMode'
'FontName'
'FontUnits'
'FontSize'
'FontAngle'
'FontWeight'
'FontSmoothing'
'TickLabelInterpreter'
'XLim'
'XLimMode'
'YLim'
'YLimMode'
'ZLim'
'ZLimMode'
'XDir'
'YDir'
'ZDir'
'CLim'
'CLimMode'
'ALim'
'ALimMode'
'ColorOrder'
'ColorOrderIndex'
'LineStyleOrder'
'LineStyleOrderIndex'
'TickDir'
'TickDirMode'
'Layer'
'Title'
'TickLength'
'GridLineStyle'
'MinorGridLineStyle'
'GridColor'
'GridColorMode'
'MinorGridColor'
'MinorGridColorMode'
'GridAlpha'
'GridAlphaMode'
'MinorGridAlpha'
'MinorGridAlphaMode'
'XAxisLocation'
'XColor'
'XColorMode'
'XTick'
'XTickMode'
'XTickLabelRotation'
'XLabel'
'XScale'
'XTickLabel'
'XTickLabelMode'
'XMinorTick'
'YAxisLocation'
'YColor'
'YColorMode'
'YTick'
'YTickMode'
'YTickLabelRotation'
'YLabel'
'YScale'
'YTickLabel'
'YTickLabelMode'
'YMinorTick'
'ZColor'
'ZColorMode'
'ZTick'
'ZTickMode'
'ZTickLabelRotation'
'ZLabel'
'ZScale'
'ZTickLabel'
'ZTickLabelMode'
'ZMinorTick'
'BoxStyle'
'LineWidth'
'Color'
'Clipping'
'NextPlot'
'SortMethod'
'TitleFontWeight'
'TitleFontSizeMultiplier'
'LabelFontSizeMultiplier'
'ClippingStyle'
'CurrentPoint'
'XGrid'
'XMinorGrid'
'YGrid'
'YMinorGrid'
'ZGrid'
'ZMinorGrid'
'Box'
'UIContextMenu'
'BusyAction'
'BeingDeleted'
'Interruptible'
'CreateFcn'
'DeleteFcn'
'ButtonDownFcn'
'Type'
'Tag'
'UserData'
'Selected'
'SelectionHighlight'
'HitTest'
'PickableParts'
'Children'
'Parent'
'Visible'
'HandleVisibility'
I would like to see only the possibilities for 'Units'. One of them is 'Normalized', for others I'm not sure.
Image Analyst
Image Analyst 2015-8-16
If you're using GUIDE, then all the option for each control's property are presented in the Property INspector in drop down list for that control. For example, the units property will show 'Characters', 'Normalized', etc. in the drop down list.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Graphics Performance 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by