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

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

 채택된 답변

추가 답변 (1개)

Image Analyst
Image Analyst 2015년 8월 16일

0 개 추천

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

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.
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.

댓글을 달려면 로그인하십시오.

카테고리

질문:

2015년 8월 16일

댓글:

2015년 8월 16일

Community Treasure Hunt

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

Start Hunting!

Translated by