ATROOT
ATROOT\atdemos
ATROOT\atgui
ATROOT\atphysics
ATROOT\dev
ATROOT\lattice
ATROOT\simulator\track
ATROOT\simulator\element
WINDOWS 2000
From the 'Start' menu choose: 'Settings' - 'Control Panel' -'System' -
'Advanced' - 'Environment Variables' - 'System variables' - 'New'

UNIX - bash
$ ATROOT=/mnt/winfat/at1.2
$ export ATROOT
$ matlab&
Verify that ATROOT environment variable is known to MATLAB
>> ATROOT=getenv('ATROOT')
Add ATROOT and its subdirectories to the MATLAB path
>> cd(ATROOT)
>> atpath(pwd)
Alternatively, you may choose 'Set Path' - 'Add with Subfolders' from the MATLAB 'File' menu and navigate to ATROOT
See the MATLAB - External Interfaces Manual. Make sure that you can 'mex'
the MATLAB examples.
If the GNU gcc compiler is installed and properly configured on your system,
you may be able to skip reading the manual.
>> mex -setup
then choose the GNU gcc compiler from the menu. Run atmexall
>> atmexall
WINDOWS
Windows mex-files are included with this distribution.
If you have the Microsoft Visual C++ compiler, you may want to test atmeaxall anyway in case you write your own element pass-methods. First, configure the MATLAB 'mex' facility to use MSVC compiler:
>> mex -setup
then choose the Microsoft compiler from the menu. Run atmexall
>> atmexall
>> atdiag
2. Load an example lattice of the SPEAR storage ring
>> spear2
3. Track one particle for 1 turn around the ring:
>> r0 = [0.001 0 0.001 0 0 0]'
>> ringpass(THERING, r0 ,1)
4. Plot beta-functions
>> plotbeta