oop - MATLAB doesn't show help for user-created class private methods and properties -


this problem:

  1. create class , set access private of properties or methods.
  2. use doc command created class. auto-generate documentation comments , show in built-in browser.

    doc classname

the problem documentation private properties , methods not shown in browser. there way overcome problem?

so spent 10 minutes using debugger, jumping 1 function next, tracing execution path of simple doc myclass call.

eventually lead me following file:

fullfile(toolboxdir('matlab'),'helptools','+helputils','isaccessible.m') 

this function called during process of generating documentation class determine if class elements (including methods, properties, , events) publicly accessible , non-hidden. information used later on "cull" elements.

so if willing modify matlab's internal functions, , want docs show methods , properties regardless of scope, rewrite function say:

function b = isaccessible(classelement, elementkeyword)     b = true;     return      % ... more code we'll never reach! end 

of course, don't forget make backup of file in case changed mind later :)

(on recent windows, you'll need perform step administrative privileges)


as test, take sample class defined in this page , run doc someclass. result:

doc someclass


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -