-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy patheegplugin_lsl_app_matlabviewer.m
60 lines (53 loc) · 2.12 KB
/
eegplugin_lsl_app_matlabviewer.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
% eegplugin_lsl_app_matlabviewer() - EEGLAB plugin for Matlab LSL viewer.
%
% Usage:
% >> eegplugin_lsl_app_matlabviewer(fig, trystrs, catchstrs);
%
% Inputs:
% fig - [integer] EEGLAB figure
% trystrs - [struct] "try" strings for menu callbacks.
% catchstrs - [struct] "catch" strings for menu callbacks.
%
% Authors: Arnaud Delorme for the plugin and Christian Kothe for the viewer
%
% See also: pop_loadbv()
% Copyright (C) 2004 Arnaud Delorme
%
% 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-1307 USA
function vers = eegplugin_lsl_app_matlabviewer(fig, trystrs, catchstrs)
vers = 'lsl_app_matlabviewer1.3';
if nargin < 3
error('eegplugin_bva_io requires 3 arguments');
end
% add folder to path
% ------------------
if ~exist('eegplugin_lsl_app_matlabviewer')
p = which('eegplugin_lsl_app_matlabviewer.m');
p = p(1:findstr(p,'eegplugin_lsl_app_matlabviewer.m')-1);
addpath( p );
addpath( fullfile(p, 'liblsl-Matlab') );
addpath( fullfile(p, 'liblsl-Matlab', 'bin') );
addpath( fullfile(p, 'liblsl-Matlab', 'mex') );
addpath( fullfile(p, 'arg_system') );
end
% find import data menu
% ---------------------
menui = findobj(fig, 'label', 'File');
% menu callbacks
% --------------
comcnt1 = 'vis_stream;';
% create menus
% ------------
uimenu( menui, 'label', 'Matlab LSL viewer', 'callback', comcnt1, 'separator', 'on', 'position', 5 );