function main_window
main_window = figure('Position',[300 300 1000 500], 'MenuBar', 'none', 'ToolBar', 'none',...
'NumberTitle','off','Name','Curve Fitting for SORA Science Team')
clearvars -except main_window
t = uicontrol(main_window,'Style','text',...
'String','To use this curve fitting application, simply select a folder containing your desired .csv files. This program will automatically apply an 8-term Fourier Series as the fitted curve, though if this is not sufficient you can launch the curve fitting toolbox and manually fit the curve. Once all of your data sets have been curve fitted, click the integrate button to produce compare data sets.',...
'Position',[10 20 200 200]);
file_panel = uipanel('Title','Files in Session','FontSize',8,...
'Position',[.01 .507 .2 .46]);
file_list = uicontrol(file_panel,'Style','listbox',...
'Position',[10 60 176 150],'Value',1);
load_file_btn = uicontrol(file_panel,'Style','pushbutton','String','Load New Files',...
'Position',[10 10 100 40],'Callback', @load_files);
plot_panel = uipanel('Title','Curve Fitted Plots','FontSize',8,...
'Position',[.22 .07 .77 .9]);
tgroup = uitabgroup('Parent', plot_panel);
end
function load_files(hObject, eventdata, handles)
Folder_Location = uigetdir;
d = dir([Folder_Location, '\*.csv']);
n = length(d);
All_Files = dir( fullfile(Folder_Location,'*.csv') );
All_Files = {All_Files.name}';
set(handles.file_list, 'String', char(All_Files));
end