Close This Window

Please download official ILL logos here

 

For using on the web or on a screenFor printing in high resolutionWhite version, for dark backgrounds

Download PNG

Download AI

Download white PNG

Download JPG

 

Download white AI

startup.m

The Computing for Science (CS) group supports ILL scientists, students and visitors in a number of activities including data analysis, instrument simulation and sample simulation.

Back to ILL Homepage
English French Deutsch 

All Software

startup

% Matlab TAS libraries startup file
% Install path, then launch startuser.m if exists
% check for ffind and looktxt programs

% This line indicates the path to Matlab libraries 19/11/98
%libroot = [ matlabroot filesep 'toolbox' filesep 'local' ]; % if installed by root in matlab
libroot = '/home/tas/matroot/matlab'; % a shared one
%libroot = '/home/cs/farhi/matlab/local'; % a specific

path(path,libroot);
libroot = [ libroot filesep ];

disp([ 'ILL Library location ' libroot ]);
disp('Install local libs : SpectralTools, FileTools, MiscTools, funcs...');
path(path,[ libroot 'FileTools' ]);
path(path,[ libroot 'MiscTools' ]);
path(path,[ libroot 'SpectralTools' ]);
%path(path,[ libroot 'funcs' ]);

fprintf(1,'Install Matlab Graphic apps : ');
fprintf(1,'Mfit, ');
path(path,[ libroot 'mfit4' ]);
path(path,[ libroot 'load' ]);
path(path,[ libroot 'nllsq' ]);
path(path,[ libroot 'funcs' ]);

fprintf(1,'Rescal, ');
path(path,[ libroot 'rescal5' ]);
path(path,[ libroot 'funcs' filesep 'trix' ]);

fprintf(1,'Mview, ');
path(path,[ libroot 'mview4' ]);

fprintf(1,'SSym, ');
path(path,[ libroot 'ssym1' ]);

fprintf(1,'Spec1d packages. \n');
path(path,[ libroot 'spec1d' ]);

fprintf(1,'mslice package. \n');
path(path,'/usr/local/src/mprogs/mslice/');

% Matlab auto-install ===========================================

eval('st_user = getenv(''USER'');','st_user = computer;');

st_path = getenv('PATH');

if exist('looktxt') ~= 3
disp('WARN : can''t find "looktxt" mex file (Needed for some load routines).')
end

fprintf(1,'Hello %s ! Your PRINTER is ',st_user);

eval('st_printer = getenv(''PRINTER'');','st_printer = [];');
if isempty(st_printer)
fprintf(1,'(undefined).\n');
if isunix & (strcmp(st_user,'in1') | strcmp(st_user,'in8') | strcmp(st_user,'in14') | strcmp(st_user,'in20'))
disp('WARN : Add the following line at the end of your .cshrc file :')
disp([ 'setenv PRINTER lj1_' st_user '_ps' ]);
end
else
fprintf(1,'%s.\n',st_printer)
end

clear libroot st_a st_b st_user st_path st_printer

disp('use "doc" command to access Hypertext OnLine Help (with Netscape).');
disp('TIP : Ctrl-a = go to start of line, Ctrl-e = go to end of line')
disp(' Up ar. = backward history completion. Type "help cedit" for more.')

%colordef black

format short e

if exist('startuser')
disp('Now reading your startuser.m file ...');
startuser
else
disp('OK, you don"t have any startuser.m file.');
end

fprintf(1,'Current directory is : %s\n',pwd);

set(0,'DefaultFigurePaperUnits','centimeters');
set(0,'DefaultFigurePaperType','A4');

if exist('matlab.mat')
disp('Getting previous workspace data from matlab.mat')
load matlab.mat
end
if exist('matlab.log')
disp('Previous Matlab Log file is renamed as matlab.log.old')
try
copyfile('matlab.log', 'matlab.log.old');
delete('matlab.log');
catch
end
end
diary matlab.log
%disp([ 'matlab.log started on : ' datestr(now) ])