function varargout = epsp_ipsp_gui(varargin)
% EPSP_IPSP_GUI M-file for epsp_ipsp_gui.fig
% EPSP_IPSP_GUI, by itself, creates a new EPSP_IPSP_GUI or raises the existing
% singleton*.
%
% H = EPSP_IPSP_GUI returns the handle to a new EPSP_IPSP_GUI or the handle to
% the existing singleton*.
%
% EPSP_IPSP_GUI('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in EPSP_IPSP_GUI.M with the given input arguments.
%
% EPSP_IPSP_GUI('Property','Value',...) creates a new EPSP_IPSP_GUI or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before epsp_ipsp_gui_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to epsp_ipsp_gui_OpeningFcn via varargin.
%
% *See GUI Options on GUIDE Tools menu. Choose "GUI allows only one
% instance to run (singleton)".
%
% See also: GUIDE, GUIDATA, GUIHANDLES
% Edit the above text to modify the response to help epsp_ipsp_gui
% Last Modified by GUIDE v2.5 17-Aug-2009 16:25:27
% Begin initialization code - DO NOT EDIT
addpath(genpath(pwd));
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @epsp_ipsp_gui_OpeningFcn, ...
'gui_OutputFcn', @epsp_ipsp_gui_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
% --------------------------------------------------------------------
% Initialization
% --------------------------------------------------------------------
% --- Executes just before epsp_ipsp_gui is made visible.
function epsp_ipsp_gui_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 data (see GUIDATA)
% varargin command line arguments to epsp_ipsp_gui (see VARARGIN)
% Choose default command line output for epsp_ipsp_gui
handles.output = hObject;
% set file names and other data as specified in 'names.m' file
names;
handles.abstract_pdf = abstract_pdf;
handles.article1_pdf = article1_pdf;
handles.article2_pdf = article2_pdf;
handles.code_listing_html = code_listing_html;
handles.description_pdf = description_pdf;
handles.how_to_run_pdf = how_to_run_pdf;
handles.inputs_pdf = inputs_pdf;
handles.model_name = model_name;
handles.system_diagram_pdf = system_diagram_pdf;
handles.system_diagram_png = system_diagram_png;
handles.tutorial_pdf = tutorial_pdf;
% show system diagram on main GUI
set(hObject, 'Units', 'pixels');
[X,map] = imread(system_diagram_png);
imshow(X,map)
axis off;
% set title
htitle = findobj('String','EPSP IPSP');
set(htitle,'String',handles.model_name);
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes epsp_ipsp_gui wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout = epsp_ipsp_gui_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 data (see GUIDATA)
% Get default command line output from handles structure
varargout{1} = handles.output;
%======================================================================
% --------------------------------------------------------------------
% Title
% --------------------------------------------------------------------
% --- Executes during object creation, after setting all properties.
function title_text_CreateFcn(hObject, eventdata, handles)
% hObject handle to title_text (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
set(hObject,'String','Neuronal Inputs');%handles.model_name);
% --------------------------------------------------------------------
% File
% --------------------------------------------------------------------
function file_menu_Callback(hObject, eventdata, handles)
% hObject handle to file_menu (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --------------------------------------------------------------------
% File -> Exit
% --------------------------------------------------------------------
function exit_menu_item_Callback(hObject, eventdata, handles)
% hObject handle to exit_menu_item (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
clf
close
% --------------------------------------------------------------------
% Model
% --------------------------------------------------------------------
function model_menu_Callback(hObject, eventdata, handles)
% hObject handle to model_menu (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --------------------------------------------------------------------
% Model -> Description
% --------------------------------------------------------------------
function article_Callback(hObject, eventdata, handles)
% hObject handle to article (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
open(handles.description_pdf);
% --------------------------------------------------------------------
% Model -> System Diagram
% --------------------------------------------------------------------
function system_diagram_menu_item_Callback(hObject, eventdata, handles)
% hObject handle to system_diagram_menu_item (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
open(handles.system_diagram_pdf);
% --------------------------------------------------------------------
% Model -> Inputs
% --------------------------------------------------------------------
function inputs_Callback(hObject, eventdata, handles)
% hObject handle to inputs (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
open(handles.inputs_pdf);
% --------------------------------------------------------------------
% Run - Disabled for Microcircuits
% --------------------------------------------------------------------
function Run_Callback(hObject, eventdata, handles)
% hObject handle to Run (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --------------------------------------------------------------------
% Run -> Complement - Disabled for Microcircuits
% --------------------------------------------------------------------
function run_complement_menu_item_Callback(hObject, eventdata, handles)
% hObject handle to run_complement_menu_item (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --------------------------------------------------------------------
% Example
% --------------------------------------------------------------------
function example_Callback(hObject, eventdata, handles)
% hObject handle to example (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --------------------------------------------------------------------
% Example -> Run Example
% --------------------------------------------------------------------
function example_menu_Callback(hObject, eventdata, handles)
% hObject handle to example_menu (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
run_example;
% --------------------------------------------------------------------
% Article
% --------------------------------------------------------------------
function Article_Callback(hObject, eventdata, handles)
% hObject handle to Article (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --------------------------------------------------------------------
% Tutorial
% --------------------------------------------------------------------
function Tutorial_Callback(hObject, eventdata, handles)
% hObject handle to Tutorial (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --------------------------------------------------------------------
% Tutorial -> Abstract
% --------------------------------------------------------------------
function abstract_Callback(hObject, eventdata, handles)
% hObject handle to abstract (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
open(handles.abstract_pdf);
% --------------------------------------------------------------------
% Tutorial -> Tutorial
% --------------------------------------------------------------------
function tutorial_sub_Callback(hObject, eventdata, handles)
% hObject handle to tutorial_sub (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
open(handles.tutorial_pdf);
% --------------------------------------------------------------------
% Code
% --------------------------------------------------------------------
function code_Callback(hObject, eventdata, handles)
% hObject handle to code (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --------------------------------------------------------------------
% Code -> code_name
% --------------------------------------------------------------------
function complement_code_Callback(hObject, eventdata, handles)
% hObject handle to complement_code (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
open(handles.code_listing_html);
% --------------------------------------------------------------------
% Help
% --------------------------------------------------------------------
function help_menu_Callback(hObject, eventdata, handles)
% hObject handle to help_menu (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --------------------------------------------------------------------
% Help -> How to Run
% --------------------------------------------------------------------
function how_to_run_menu_item_Callback(hObject, eventdata, handles)
% hObject handle to how_to_run_menu_item (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
open(handles.how_to_run_pdf)
% --------------------------------------------------------------------
% Help -> Contact
% --------------------------------------------------------------------
function contact_menu_item_Callback(hObject, eventdata, handles)
% hObject handle to contact_menu_item (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Contact information are stored in a local html file
open('documents/Contact.html')
% --------------------------------------------------------------------
% Help -> Credits
% --------------------------------------------------------------------
function credit_menu_item_Callback(hObject, eventdata, handles)
% hObject handle to credit_menu_item (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Credit information are stored at a website
open('documents/Credits.html')
% --------------------------------------------------------------------
% Help -> License
% --------------------------------------------------------------------
function license_menu_item_Callback(hObject, eventdata, handles)
% hObject handle to license_menu_item (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
open('documents/License.html')
% --- Executes during object creation, after setting all properties.
function figure1_CreateFcn(hObject, eventdata, handles)
% hObject handle to figure1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% --------------------------------------------------------------------
function paper2_Callback(hObject, eventdata, handles)
% hObject handle to paper1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
open(handles.article2_pdf);
% --------------------------------------------------------------------
function paper1_Callback(hObject, eventdata, handles)
% hObject handle to paper1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
open(handles.article1_pdf);