clc;                                                                            % clear the command window
clear all;                                                                      % clear all variables in memory
close all;                                                                      % close all windows and ports
rng('shuffle');                                                                 % seed the random number generator

Screen('Preference', 'SkipSyncTests', 1);                                       % skip the Sync tests
[window, window_size] = Screen('OpenWindow', 0, [0 0 0], [],32,2);              % open a drawing window

Screen(window,'TextFont','Arial');                                              % specify a text font
Screen(window,'TextSize',40);                                                   % specify a text size
DrawFormattedText(window, ['Some Text'],'center', 'center', [255 0 0],[],[],[],2);    % draw some text in the middle of the screen in red

Screen('Flip',window);                                                          % push the current drawing to the screen
    
WaitSecs(3);                                                                    % wait for 3 seconds

Screen('CloseAll');                                                             % close the drawing window