Here are the instructions about how to install Matlab Toolboxes which were developed in our group.
More specifically, you will find here instructions regarding the C-based Khoros toolbox with the binaries KhorosBin, which can be called from Matlab.

  • Make sure that Matlab is installed and running properly.
  • Copy the toolboxes in a new folder ‘Toolboxes’ in the working folder of Matlab. In the given example the working folder of Matlab is : C:\Users\AdminUser\Documents\MATLAB
  • Make sure the working folder of Matlab is added to the path.
  • Type >> edit startup on the Matlab command line. If the startup file does not exist, create a new one when prompted to do so.
  • Copy the following code in the startup file, overwriting any existing code. This sets up the environment for using all the toolboxes, including the nanoimaging toolboxes developed in our group as well as the DIPimage toolbox developed at TU Delft. (For instructions specific to DIPimage , visit this page).

if ~isdeployed

ToolboxPath='C:\Users\AdminUser\Documents\MATLAB\Toolboxes'

addpath([ToolboxPath '\io\']);
addpath([ToolboxPath '\khoros']);
addpath([ToolboxPath '\matlab_tools\']);
addpath([ToolboxPath '\PEM\']);
addpath([ToolboxPath '\Optimize\']);

run('C:\Program Files\DIPimage 2.4\dipstart.m')
dipsetpref('DefaultMappingMode','lin');

global KhorosRoot
KhorosRoot=[ToolboxPath '\KhorosBin\']
global KhorosOutput %KhorosOuput is returned to this global variable

dipsetpref('TrueSize','off')

global para
set(0,'DefaultFigurePaperType','A4');
end

 

  • Make sure that the paths are correct according to your folder names and directories. ToolboxPath is the path where the toolboxes have been copies in the working folder of Matlab. KhorosRoot is the path where the binaries of Khoros toolbox reside inside the main Toolboxes folder.
  • Save the startup file. On restarting Matlab, the startup file will run automatically and all the toolboxes will get added to the path.
  • In case additional toolboxes need to be added, copy that toolbox in the Toolboxes folder and just add a line to the startup file:
addpath([ToolboxPath ‘\<name of toolbox>\’]);
Skip to toolbar