function varargout = bssgui(varargin)
%
%X=======================================================================X
%| BSSGUI: Interactive GUI to control BSS algorithms |
%X-----------------------------------------------------------------------X
%| |
%| code by: Jakub Petkov |
%| e-mail: bssgui@centrum.cz |
%| last modified: 18. 12. 2007 |
%| version: 1.0 |
%| |
%| for more information visit: |
%| http://bssgui.wz.cz/ |
%| |
%X=======================================================================X
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @bssgui_OpeningFcn, ...
'gui_OutputFcn', @bssgui_OutputFcn, ...
'gui_LayoutFcn', [] , ...
'gui_Callback', []);
if nargin && ischar(varargin{1})
gui_State.gui_Callback = str2func(varargin{1});
end
if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT
% --- Executes just before GUI is made visible.
function bssgui_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user menu_data (see GUIDATA)
% varargin command line arguments to GUI (see VARARGIN)
starting = waitbar(0,'BSSGUI STARTING... PLEASE WAIT!');
set(hObject, 'Name', 'BSSGUI by J. Petkov (c) 2007');
clc;
%disp(' ');
%disp('#');
%disp('#');
%disp('#');
%disp(' ');
disp('X================================X');
disp('| BSSGUI by J. Petkov (c) 2007 |');
disp('X================================X');
disp(' ');
disp('BSSGUI: Running...');
global X
%disp(X);
clear X
%disp(X);
global load_otevreno
load_otevreno = 0;
global data_nacteno
data_nacteno = 'ne';
global save_otevreno
save_otevreno = 1;
global test_data_otevreno
test_data_otevreno = 0;
global show_results
show_results = 0;
global plot_results
plot_results = 0;
global data_loaded
data_loaded = 0;
global details_sel
details_sel = 0;
global testdata_sel
testdata_sel = 0;
global advanced
advanced = 1;
global test_data_prom
test_data_prom = 0;
global BSSalg
BSSalg = 'EFICA';
global nastaveni
nastaveni.nonlinearity = 'rat1';
nastaveni.start = 'randn(dim)';
nastaveni.saddle = 'true';
nastaveni.epsilon = 0.0001;
nastaveni.fineepsilon = 0.00001;
nastaveni.maxit = 100;
nastaveni.maxitsaddle = 30;
nastaveni.EFICA = 30;
assignin('base', 'nastaveni', nastaveni);
global ve1a
global ve2a
global ve3a
global ve4a
global ve5a
global ve6a
global ve7a
global ve8a
global ve9a
global ve10a
ve1a = '1';
ve2a = '1';
ve3a = '1';
ve4a = '1';
ve5a = '1';
ve6a = '1';
ve7a = '1';
ve8a = '1';
ve9a = '1';
ve10a = '1';
global ve1b
global ve2b
global ve3b
global ve4b
global ve5b
global ve6b
global ve7b
global ve8b
global ve9b
global ve10b
ve1b = '1 1';
ve2b = '1 1';
ve3b = '1 1';
ve4b = '1 1';
ve5b = '1 1';
ve6b = '1 1';
ve7b = '1 1';
ve8b = '1 1';
ve9b = '1 1';
ve10b = '1 1';
global ve1c
global ve2c
global ve3c
global ve4c
global ve5c
global ve6c
global ve7c
global ve8c
global ve9c
global ve10c
ve1c = '1';
ve2c = '1';
ve3c = '1';
ve4c = '1';
ve5c = '1';
ve6c = '1';
ve7c = '1';
ve8c = '1';
ve9c = '1';
ve10c = '1';
close(starting);
% Choose default command line output for GUI
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes GUI wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout = bssgui_OutputFcn(hObject, eventdata, handles)
% varargout cell array for returning output args (see VARARGOUT);
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user menu_data (see GUIDATA)
% Get default command line output from handles structure
varargout{1} = handles.output;
global tlacitko_load
tlacitko_load = handles.load;
global tlacitko_run
tlacitko_run = handles.go;
% --- Executes on button press in load.
function load_Callback(hObject, eventdata, handles)
% hObject handle to load (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user menu_data (see GUIDATA)
global load_otevreno
global hlistbox
global hrefresh
global hload
global dim_o
global N_o
dim_o = handles.dim_o;
N_o = handles.N_o;
if (load_otevreno == 0),
f = figure('Visible', 'off', 'Units', 'pixels', 'Position', [100 400 209 318], 'Color', [0.38 0.38 0.38], 'Name', 'BSSGUI: Load data', 'Resize', 'off', 'MenuBar', 'none', 'NumberTitle', 'off');
pf = uipanel('Parent', f, 'Units', 'pixels', 'Position', [5 5 201 310], 'BackgroundColor', [0.502 0.502 0.502], 'ForegroundColor', [0 0 0], 'HighlightColor', [0 0 0], 'ShadowColor', 'black');
hload = uicontrol(pf, 'Style', 'pushbutton', 'String', 'Load', 'Callback', {@loadvar_Callback}, 'Units', 'pixels', 'Position', [21 47 155 28], 'BackgroundColor', [0.753 0.753 0.753]);
hcancel = uicontrol(pf, 'Style', 'pushbutton', 'String', 'Cancel', 'Callback', {@cancel_Callback}, 'Units', 'pixels', 'Position', [101 19 75 23], 'BackgroundColor', [0.753 0.753 0.753]);
hrefresh = uicontrol(pf, 'Style', 'pushbutton', 'String', 'Refresh', 'Callback', {@refresh_Callback}, 'Units', 'pixels', 'Position', [21 19 75 23], 'BackgroundColor', [0.753 0.753 0.753]);
hlistbox = uicontrol(pf, 'Style', 'listbox', 'Units', 'pixels', 'Position', [21 84 156 178], 'HorizontalAlignment', 'left', 'BackgroundColor', 'white');
hnad1 = uicontrol(pf, 'Style', 'text', 'Units', 'pixels', 'Position', [23 277 87 15], 'String', 'Select variable:', 'HorizontalAlignment', 'left', 'FontWeight', 'bold', 'BackgroundColor', [0.502 0.502 0.502]);
set(f, 'Visible', 'on');
load_otevreno = 1;
set(hlistbox, 'Value', 1);
var = evalin('base', 'who');
set(hlistbox, 'String', var);
[varsize1 varsize2] = size(var);
str = get(hlistbox, 'String');
[a b] = size(str);
zobraz = false;
j = 1;
for i = 1:a
por1 = strcmp('nastaveni', str{i});
por2 = strcmp('dim', str{i});
por3 = strcmp('N', str{i});
if (por1 == false) & (por2 == false) & (por3 == false)
str_new{j} = str{i};
j = j+1;
zobraz = true;
end
end
if (zobraz == true)
set(hlistbox, 'String', str_new);
set(hload, 'Enable', 'on');
else
disp('BSSGUI: No variables to load!');
set(hlistbox, 'String', '');
set(hload, 'Enable', 'off');
end
end
% --- Executes on button press in loadvar.
function refresh_Callback(hObject, eventdata, handles)
% hObject handle to load (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user menu_data (see GUIDATA)
global hlistbox
global hload
set(hlistbox, 'V