ALL HOW TOs




Clear the MATLAB toolbox file path cache

Reference: Toolbox Path Caching in MATLAB (MATLAB doc)


If MATLAB is picking up stale code from the toolbox area, you can fix this by clearing the toolbox cache using one of two methods:

Method 1: Thru UI

  • File -> Preferences -> General
  • Click Update Toolbox Path Cache button

Method 2: Thru command line

  • Type the following two commands in the command window
    • rehash toolbox
    • rehash toolboxcache



Auto-add paths at startup
  • Edit file: MATLAB\R2010a\toolbox\local\matlabrc.m
  • Goto bottom of file
  • Add...

    addpath(genpath(strcat(matlabroot,'\toolbox\dm-matlab-messageQueue')));



Understanding Position
  • pos = distance from left, distance from bottom, width, height
  • set(handle, 'Position', pos)



Helpful Shortcuts
  • fcd _FUNCTION_NAME_ - finds the function on the current path and changes to the directory where the file defining the function lives





  • No labels