-
Notifications
You must be signed in to change notification settings - Fork 7
/
eegplugin_nft.m
71 lines (61 loc) · 2.33 KB
/
eegplugin_nft.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
% eegplugin_nft() - NFT plugin
%
% Usage:
% >> eegplugin_nft(fig, trystrs, catchstrs);
%
% Inputs:
% fig - [integer] eeglab figure.
% trystrs - [struct] "try" strings for menu callbacks.
% catchstrs - [struct] "catch" strings for menu callbacks.
%
% Author: Zeynep Akalin Acar, SCCN, INC, UCSD
% Copyright (C) 2009-, Zeynep Akalin Acar
%
% This program is free software; you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation; either version 2 of the License, or
% (at your option) any later version.
%
% This program is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with this program; if not, write to the Free Software
% Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1.07 USA
% $Log: eegplugin_nft.m,v $
function vers = eegplugin_nft(fig, trystrs, catchstrs)
vers = 'nft2.3';
if nargin < 3
error('eegplugin_nft requires 3 arguments');
end;
% add NFT folder to path
% -----------------------
if ~exist('eegplugin_nft')
p = which('eegplugin_nft');
p = p(1:findstr(p,'eegplugin_nft.m')-1);
addpath(p);
end;
if ~exist('NFT')
disp('Warning: Please install NFT and make sure it is added to MATLAB path');
end;
% find tools menu
% ---------------
menu = findobj(fig, 'tag', 'tools');
% tag can be
% 'import data' -> File > import data menu
% 'import epoch' -> File > import epoch menu
% 'import event' -> File > import event menu
% 'export' -> File > export
% 'tools' -> tools menu
% 'plot' -> plot menu
% menu callback commands
% ----------------------
comrun1 = [ 'NFT(''EEGstruct'',EEG)'];
%comrun2 = [ 'xxxxxxxxxxxxxx put your command in here xxxxxxxxxxxxxxx' ];
% create menus
% ------------
submenu = uimenu( menu, 'Label', 'NFT plugin', 'separator', 'on');
uimenu( submenu, 'Label', 'Start NFT GUI', 'CallBack', comrun1);
%uimenu( submenu, 'Label', 'Inverse Problem with NFT', 'CallBack', comrun2);