function iswindows=checkwindows
% No input arguments. Returns logical(0) if system is NOT MS Windows, and
% aborts with error if the system is MS Windows.

% Please send suggestions of a better, surefire way to check if the system is 
% running under Windows or not at nick@sep.stanford.edu.

[status0,answerline]=dos('ver');
if findstr(answerline,'Microsoft')~=[] | findstr(answerline,'MICROSOFT')~=[]
   error('The current version does not run under DOS or Windows')
end
iswindows = logical(0);