How can I have lookfor show help for files within packages?
2 views (last 30 days)
Over the last few years, I've started writing most of my Matlab code in packages. However, I don't seem to be able to search the help of these functions with lookfor, even if those functions are on the Matlab path.
Example: suppose a I have a package file:
function y = mymfile(x)
% MYMFILE - performs a computation
% Y = MYMFILE(X)
% Returns the square of X.
y = x.^2;
If I type
on the command line, mymfile is not found. How can I tell lookfor to search through my packages?
The behavior I expect is that it would return
mypackage.mymfile - performs a computation
(and the other matches on my workspace)
Anshika Chourasia on 29 Dec 2021
I understand you would like to search within packages when using "lookfor". This feature is not currently available.
As an alternative, you can use the Function Browser. This is the "fx" button located just to the left of the prompt in the Command Window. You may also be able to do this using the “builddocsearchdb” function.