mring
mring

Reputation: 1747

Is there anything like 'whereis' in MATLAB?

I have a line in the code I'm working on like this:

feval('func_name', myArg);

And it works, but I want to know where func_name is. I can't step into feval to see where it is finding func_name. Instead of (or in addition to) just doing func_name, how can I get MATLAB to tell me where it found it?

Upvotes: 3

Views: 645

Answers (2)

Radon
Radon

Reputation: 1

func_name is sometimes a file name contains the function to be evaluated on myArg. And it should be in the same directory of the main file unless specified.

Upvotes: -1

Edric
Edric

Reputation: 25140

which is the function you're looking for.

See: http://www.mathworks.com/access/helpdesk/help/techdoc/ref/which.html for more. For example:

fullpath = which( 'func_name' )

Upvotes: 6

Related Questions