function varargout = janis_permutation(varargin)
% JANIS_PERMUTATION M-file for janis_permutation.fig
%      JANIS_PERMUTATION, by itself, creates a new JANIS_PERMUTATION or raises the existing
%      singleton*.
%
%      H = JANIS_PERMUTATION returns the handle to a new JANIS_PERMUTATION or the handle to
%      the existing singleton*.
%
%      JANIS_PERMUTATION('CALLBACK',hObject,eventData,handles,...) calls the local
%      function named CALLBACK in JANIS_PERMUTATION.M with the given input arguments.
%
%      JANIS_PERMUTATION('Property','Value',...) creates a new JANIS_PERMUTATION or raises the
%      existing singleton*.  Starting from the left, property value pairs are
%      applied to the GUI before janis_permutation_OpeningFcn gets called.  An
%      unrecognized property name or invalid value makes property application
%      stop.  All inputs are passed to janis_permutation_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 janis_permutation

% Last Modified by GUIDE v2.5 23-Feb-2011 12:50:52

% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name',       mfilename, ...
                   'gui_Singleton',  gui_Singleton, ...
                   'gui_OpeningFcn', @janis_permutation_OpeningFcn, ...
                   'gui_OutputFcn',  @janis_permutation_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

function janis_permutation_OpeningFcn(hObject, eventdata, handles, varargin)
handles.output = hObject;
guidata(hObject, handles);
uiwait(handles.figure1);

function varargout = janis_permutation_OutputFcn(hObject, eventdata, handles)
out{1} = str2num(get(handles.edit_count,'String'));
out{2} = handles;
handles.output = out;
varargout{1} = handles.output;

function slider1_Callback(hObject, eventdata, handles)
set(handles.edit_count,'String',num2str(round(get(handles.slider1,'Value'))));

function slider1_CreateFcn(hObject, eventdata, handles)
if isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor',[.9 .9 .9]);
end

function pushbutton_go_Callback(hObject, eventdata, handles)
uiresume;
return

function edit_count_Callback(hObject, eventdata, handles)
set(handles.slider1,'Value',str2num(get(handles.edit_count,'String')));


% --- Executes during object creation, after setting all properties.
function edit_count_CreateFcn(hObject, eventdata, handles)
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end