diff --git a/Initialisation.m b/Initialisation.m index 97835f3364ac842e857a021953fa2f2c632fd38e..58c1ffed0a9986f613ba883ea871e39f891d6872 100644 --- a/Initialisation.m +++ b/Initialisation.m @@ -1,10 +1,15 @@ %% This is the PlotID Initialisation file % Please run this script before using PlotID -%% Step 1: Add plotID location to you MATLAB path -% This is necessary to use PlotID in your personal MATLAB Scripts -addpath(pwd); -savepath; +%% Step 1: Add plotID location to you MATLAB path via startup.m +% Change the current folder to the folder of this m-file. +cd(fileparts(which(mfilename))); +plotIDpath = pwd ; +% Add PlotID path to your startup.m file +fid = fopen(fullfile(userpath,'startup.m'),'a'); +cmdStr = ['addpath(''', plotIDpath,''');']; +fprintf(fid,'%s\n', cmdStr); +fclose(fid); %% Section 2 Config File % To make things easy, you should use the config file. The following wizard @@ -26,4 +31,5 @@ if writeConfig end %% +clc disp('Initialisition done.')