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

1 view (last 30 days)
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

Answers (2)

Star Strider
Star Strider on 22 Nov 2015
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 Comments
rbarata
rbarata on 22 Nov 2015
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?
Star Strider
Star Strider on 22 Nov 2015
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).

Sign in to comment.


Image Analyst
Image Analyst on 22 Nov 2015
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 Comments
rbarata
rbarata on 22 Nov 2015
Edited: rbarata on 22 Nov 2015
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.

Sign in to comment.

Categories

Find more on Graphics Object Programming in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!