Skip to content

userpath

general · scripts/general/userpath.m

USERPATH  MATLAB-compatible user folder on the search path.

  P = USERPATH returns the userpath folder (default:
  fullfile(home,'Documents','MATLAB')), matching MATLAB R2026a on Linux.

  USERPATH(FOLDER) sets the userpath to FOLDER (creating it if needed)
  and prepends it on the search path.

  USERPATH('-clear') clears the stored userpath (returns '').