function varargout = compgui(varargin)
% COMPGUI M-file for compgui.fig
% COMPGUI, by itself, creates a new COMPGUI or raises the existing
% singleton*.
%
% H = COMPGUI returns the handle to a new COMPGUI or the handle to
% the existing singleton*.
%
% COMPGUI('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in COMPGUI.M with the given input arguments.
%
% COMPGUI('Property','Value',...) creates a new COMPGUI or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before compgui_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to compgui_OpeningFcn via varargin.
%
% *See GUI Options on GUIDE's 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 compgui
% Last Modified by GUIDE v2.5 05-May-2009 15:46:12
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @compgui_OpeningFcn, ...
'gui_OutputFcn', @compgui_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 compgui is made visible.
function compgui_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 compgui (see VARARGIN)
% Choose default command line output for compgui
handles.output = hObject;
% show system diagram on main GUI
set(hObject, 'Units', 'pixels');
[X,map] = imread('complement_coding_icon_3_elaborated_smaller.png');
imshow(X,map)
axis off;
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes compgui wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout = compgui_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;
%======================================================================
% --------------------------------------------------------------------
% 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('Microcircuit_Complement_Coding.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('complement_coding_icon_3_elaborated.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('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)
complement_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)
% --------------------------------------------------------------------
% Article -> Carpenter st al., 1991
% --------------------------------------------------------------------
function Paper_Callback(hObject, eventdata, handles)
% hObject handle to Paper (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
open('CarpenterGrossbergRosen1991b.pdf');
% --------------------------------------------------------------------
% 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('Microcircuit_Complement_Coding.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('Complement_Coding_Example_5D.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 -> Complement Code
% --------------------------------------------------------------------
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('Complement_Code.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('Microcircuit_Complement_Coding_CodeHelp.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('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('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('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