function myInterface()
% function myInterface()
% myInterface.m provides room for MATLAB commands not possible with 
% matlab -r "myApp, exit"  
% getbev.m is a RCS util. to extract core count and SGE_TASK_ID

[nslots, task] = getbev;  %/project/scv/examples/matlab/batch/getbev.m

% Use task to set parameters and computations to perform
if task == 'undefined'         % Array Job (qsub -t) not activated
   n = 100;                    % arbitrary
else                           % Array Job (qsub -t) activated
   n = task;                   % task is distinct for each job
end
s = myApp(n, nslots);          % example user app
save(['AS_' num2str(n)], 's'); % save s to mat-file

end   % end of function
