- the quoted string is the first expression (possibly after whitespace) after the beginning of the line, or after a comma (",") or semi-colon (";") that marks the end of anything previous on the line
- the quoted string immediately follows (no whitespace) a non-quoted underscore ('_') or period ('.')
- the quoted string immediately follows (no whitespace) a latin letter or latin digit
Why does tab complete not work for user written functions that except filenames?
2 views (last 30 days)
Show older comments
Why does tab complete not work for user written functions that except filenames?
function testFunction(file)
disp(file)
end %end function
Call the above function with a file. While entering the file name, try to tab complete it. It won't work. Why not?
0 Comments
Accepted Answer
Walter Roberson
on 14 Aug 2013
Edited: Walter Roberson
on 14 Aug 2013
The rules for tab completion are not well defined, and do not always make sense.
Tab completion for a quoted string takes place if:
In addition, there are circumstances under which a quoted string that follows an exclamation mark ('!') may lead to a flawed tab completion, in which the resulting word is missing one or more characters from the file name.
None of the above situations match attempting to enter a valid quoted string as the argument to a function. :(
2 Comments
More Answers (1)
David Sanchez
on 14 Aug 2013
The user defined function has to be saved on the current directory or its path set on matlab paths. Matlab will not autocomplete a function name of a function located in a directory different to the working directory.
See Also
Categories
Find more on Environment and Settings in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!