跳至内容

MATLAB 编程/Psychtoolbox/ptb ind general setup.m

来自 Wikibooks,开放世界开放图书
%ptb_ind_general_setup.m
%use to set up some values to make code portable between different
%versions of psychtoolbox
%This does not refer to any screen functions. 
%
% Robert Kohr - July 6, 2005 - created file

v = version;
v = str2num(v(1));
osx = 0;
oldmac = 0;
win = 0;

if(strcmp(computer, 'MAC')|strcmp(computer, 'MAC2'))
    if(v<6) %classic mode
        comp_type = 'oldmac';
        oldmac=1;
    else
        comp_type = 'osx';
        osx =1;
    end
else
    comp_type = 'win';
    win=1;
end
left_arrow_name = 'left';
right_arrow_name = 'right';
up_arrow_name = 'up';
down_arrow_name = 'down';

if(oldmac)
    dir_sep = ':';
    left_arrow_name = 'left';
    right_arrow_name = 'right';
    up_arrow_name = 'up';
    down_arrow_name = 'down';
elseif(win)
	dir_sep = '/';
else %os x
    left_arrow_name = 'LeftArrow';
    right_arrow_name = 'RightArrow';
    up_arrow_name = 'RightArrow';
    down_arrow_name = 'RightArrow';
    dir_sep = '/';
end
华夏公益教科书