Home > vbmeg > external > mne > mne_license.m

mne_license

PURPOSE ^

MNE_LICENSE prints the license only once upon the first call to

SYNOPSIS ^

function mne_license

DESCRIPTION ^

 MNE_LICENSE prints the license only once upon the first call to
 this function. If the user does a "clear all", the license will
 again be shown.  This function should be included in every openmeeg
 function to ensure that the license is displayed at least once.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function mne_license
0002 
0003 % MNE_LICENSE prints the license only once upon the first call to
0004 % this function. If the user does a "clear all", the license will
0005 % again be shown.  This function should be included in every openmeeg
0006 % function to ensure that the license is displayed at least once.
0007 
0008 % Copyright (C) 2009-2011, Robert Oostenveld
0009 
0010 persistent status
0011 
0012 if isempty(status)
0013   % this is for the first time
0014   status = false;
0015 end
0016 
0017 if ~status
0018   % show the license
0019   try
0020     tmp = which('mne_license');
0021   catch
0022     tmp = mfilename; 
0023   end
0024   [p, f] = fileparts(tmp);
0025   clc
0026   fprintf('==============================================================================\n');
0027   type(fullfile(p, 'LICENSE.txt'));
0028   fprintf('==============================================================================\n');
0029   % remember that it has been shown
0030   status = true;
0031   pause(3)
0032 end
0033

Generated on Mon 22-May-2023 06:53:56 by m2html © 2005