How to get documentation of methods?

5 次查看(过去 30 天)
Jette
Jette 2016-4-13
Hello,
I am a quite experienced user of MATLAB and am programming myself using OOP in MATLAB. I want to prepare some information for MATLAB and programming newbies about how to use objects in MATLAB. They should not need anything to know about how to program classes in MATLAB. But I want to show them how to watch and change object properties and how to use class methods. I would like to take the class VideoReader as an example which should be easy understandable. Now I cam across the question of how one can easily find out 1) which methods the class has and 2) how to use these methods ( e.g. exact meaning, parameters).
What I know:
  • if I type my object name and dot and press tab, I can see all properties and methods. Usually, for classes implemented by MATLAB, the method names are lowercase while the property names are uppercase.
  • I know the functions methods and methodsview but they don't show me the meaning of each method
Also, I find the result of 'doc VideoReader' not very helpful in this context.
Do I overlook something?

回答(1 个)

Steven Lord
Steven Lord 2016-4-13
So you want to show them some help text?
To get help for the methods of the name class, specify
help name.methodname
Use this like:
help VideoReader.hasFrame
Or perhaps you want to show them the documentation for the hasFrame method of VideoReader objects?
Not all methods will have documentation, extensive help text, or even any help text at all. In particular, methods that users shouldn't have to invoke directly may not have much help (since you probably shouldn't be trying to use it directly.)

类别

Help CenterFile Exchange 中查找有关 Software Development Tools 的更多信息

标签

产品

Community Treasure Hunt

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

Start Hunting!

Translated by