R like str() function in matlab/GNU Octave

左心房为你撑大大i 提交于 2019-11-29 11:22:29

There are several useful functions for displaying some information about Matlab objects (I can't say anything about Octave compatibility), but I'm not sure they'll provide the same detail as R's str(). You can display all of the methods of a class with the methods function, e.g.:

methods('MException')

which returns

Methods for class MException:

 addCause       getReport      ne             throw          
 eq             isequal        rethrow        throwAsCaller  

 Static methods:

 last

The what function will return similar results. Or methods can be used on an object of a given class:

ME = MException('Test:test','Testing');
methods(ME)

Similarly, you can view the properties with properties and the events with events.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!