How do I know if it's an object or a function?

Hello, my friends
Simple question, no?
In previous questions I though box was an object but it seems to be a function. How can I get this info without asking questions in forums?
Thanks

回答(2 个)

One option would be to use the class function. There may be others, such as those linked to at the end of that documentation.

4 个评论

Can you post an example of its usage? For box, for ex?
Thanks
It doesn’t work with ‘Box’, since ‘Box’ is an axes property. The best you can do is the isprop function, but you have to have an object as an argument as well because the function looks for that property within the object.
It’s almost as though you have to know the answer before you ask the question.
So, let me put the question in another way...during my work, how can I know which objects I have available to use if needed, and which objects I am already using?
I don’t understand.
To the best of my knowledge, there’s no conservation law for objects. You use them as you need them. Properties are (to the best of my knowledge) inherent to particular objects, and are unique to each (unless you declare specific default properties that can also be individually overridden, but I’d rather not get into all that just now).

请先登录,再进行评论。

Perhaps you want a dependency report, which you can get from the little down arrow on the title bar of the Current Folder panel.
Or you can use the methods() function which lists all the methods that a particular class or object has.

2 个评论

I don't think a dependency report is what I want. I'm trying to understand how to program in Matlab so I would like to know the hierarchies and how the different "components" interact with each other. Something like this chart. For example, in a previous post I mentioned something called BoxFrame that allows you to define properties values for the box. There's also something called boxFrame.FrontEdge which seems to be in the dependency of the BoxFrame because it allows you to define properties values only to the front edges of the box. So, clearly there is a dependency of the frontedge because it's contained by the boxFrame. What I would like to get is a chart (or any other media) that shows these relationships. I was trying to get this through get() because this is a query for graphics object properties but, obviously, it doesn't work for the box because it is not an object. If I had that information before (by means of what I'm asking, chart, whatever) it would be much easier and much less confusing for a new user like me. :)
BTW:I could not find in the documentation (nor in any propertie list) anything called boxFrame nor FrontEdge, but it must be somewhere. This is an example of something that could be used but is buried deep somewhere and almost inaccessible.

请先登录,再进行评论。

类别

帮助中心File Exchange 中查找有关 Clocks and Timers 的更多信息

标签

提问:

2015-11-22

Community Treasure Hunt

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

Start Hunting!

Translated by