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

% Last Modified by GUIDE v2.5 19-Dec-2003 11:51:20

% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name',       mfilename, ...
                   'gui_Singleton',  gui_Singleton, ...
                   'gui_OpeningFcn', @sds_OpeningFcn, ...
                   'gui_OutputFcn',  @sds_OutputFcn, ...
                   'gui_LayoutFcn',  [] , ...
                   'gui_Callback',   []);
if nargin & isstr(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 sds is made visible.
function sds_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 sds (see VARARGIN)

% Choose default command line output for sds
handles.output = hObject;

n = str2double(get(handles.nval,'String'));
Nprime = str2double(get(handles.Nprimeval,'String'));
r = str2double(get(handles.rvalue,'String'));

buildTestSet(n,floor(n/10));

[aSpace,storage,C_SetSizes] = createMemory(n,Nprime,r,'testSet');

handles.addressSpace = aSpace;
handles.storageCells = storage;
handles.C_Sets = C_SetSizes;
handles.n = n;
handles.r = r;
handles.Nprime = Nprime;
%handles.A = zeros(10);
% Update handles structure
guidata(hObject, handles);




% UIWAIT makes sds wait for user response (see UIRESUME)
% uiwait(figure1); 


% --- Outputs from this function are returned to the command line.
function varargout = sds_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;





% --- Executes on button press in checkbox1.
function checkbox1_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox1 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox1

%%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);




%--- Executes on button press in checkbox2.
function checkbox2_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox2 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox2
%%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox3.
function checkbox3_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox3 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox3
%%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox4.
function checkbox4_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox4 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox4
%%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox5.
function checkbox5_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox5 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox5
%%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox6.
function checkbox6_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox6 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox6
%%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox7.
function checkbox7_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox7 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox7
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%%guidata(hObject,handles);

% --- Executes on button press in checkbox8.
function checkbox8_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox8 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox8
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);


% --- Executes on button press in checkbox9.
function checkbox9_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox9 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox9
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox10.
function checkbox10_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox10 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox10
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox11.
function checkbox11_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox11 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox11
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox12.
function checkbox12_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox12 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox12
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox13.
function checkbox13_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox13 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox13
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox14.
function checkbox14_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox14 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox14
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox15.
function checkbox15_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox15 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox15
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox16.
function checkbox16_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox16 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox16
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox17.
function checkbox17_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox17 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox17
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox18.
function checkbox18_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox18 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox18
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox19.
function checkbox19_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox19 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox19
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox20.
function checkbox20_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox20 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox20
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox21.
function checkbox21_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox21 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox21
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox22.
function checkbox22_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox22 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox22
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox23.
function checkbox23_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox23 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox23
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox24.
function checkbox24_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox24 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox24
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox25.
function checkbox25_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox25 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox25
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox26.
function checkbox26_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox26 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox26
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox27.
function checkbox27_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox27 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox27
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox28.
function checkbox28_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox28 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox28
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox29.
function checkbox29_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox29 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox29
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox30.
function checkbox30_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox30 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox30
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox31.
function checkbox31_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox31 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox31
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox32.
function checkbox32_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox32 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox32
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox33.
function checkbox33_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox33 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox33
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox34.
function checkbox34_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox34 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox34
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox35.
function checkbox35_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox35 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox35
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox36.
function checkbox36_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox36 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox36
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox37.
function checkbox37_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox37 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox37
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox38.
function checkbox38_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox38 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox38
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox39.
function checkbox39_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox39 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox39
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox40.
function checkbox40_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox40 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox40
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox41.
function checkbox41_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox41 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox41
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox42.
function checkbox42_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox42 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox42
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox43.
function checkbox43_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox43 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox43
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox44.
function checkbox44_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox44 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox44
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox45.
function checkbox45_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox45 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox45
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox46.
function checkbox46_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox46 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox46
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox47.
function checkbox47_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox47 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox47
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox48.
function checkbox48_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox48 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox48
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox49.
function checkbox49_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox49 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox49
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox50.
function checkbox50_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox50 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox50
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox51.
function checkbox51_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox51 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox51
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox52.
function checkbox52_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox52 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox52
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox53.
function checkbox53_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox53 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox53
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox54.
function checkbox54_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox54 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox54
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox55.
function checkbox55_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox55 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox55
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox56.
function checkbox56_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox56 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox56
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox57.
function checkbox57_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox57 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox57
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox58.
function checkbox58_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox58 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox58
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox59.
function checkbox59_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox59 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox59
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox60.
function checkbox60_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox60 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox60
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox61.
function checkbox61_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox61 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox61
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox62.
function checkbox62_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox62 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox62
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox63.
function checkbox63_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox63 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox63
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox64.
function checkbox64_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox64 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox64
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox65.
function checkbox65_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox65 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox65
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox66.
function checkbox66_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox66 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox66
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox67.
function checkbox67_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox67 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox67

%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);
% --- Executes on button press in checkbox68.
function checkbox68_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox68 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox68
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox69.
function checkbox69_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox69 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox69
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox70.
function checkbox70_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox70 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox70
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox71.
function checkbox71_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox71 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox71
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox72.
function checkbox72_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox72 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox72
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox73.
function checkbox73_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox73 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox73
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox74.
function checkbox74_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox74 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox74
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox75.
function checkbox75_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox75 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox75
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox76.
function checkbox76_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox76 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox76
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox77.
function checkbox77_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox77 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox77
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox78.
function checkbox78_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox78 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox78
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox79.
function checkbox79_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox79 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox79
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox80.
function checkbox80_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox80 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox80
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox81.
function checkbox81_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox81 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox81
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox82.
function checkbox82_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox82 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox82
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox83.
function checkbox83_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox83 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox83
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox84.
function checkbox84_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox84 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox84
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox85.
function checkbox85_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox85 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox85
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox86.
function checkbox86_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox86 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox86
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox87.
function checkbox87_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox87 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox87
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox88.
function checkbox88_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox88 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox88
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox89.
function checkbox89_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox89 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox89
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox90.
function checkbox90_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox90 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox90
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox91.
function checkbox91_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox91 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox91
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox92.
function checkbox92_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox92 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox92
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox93.
function checkbox93_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox93 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox93

%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);
% --- Executes on button press in checkbox94.
function checkbox94_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox94 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox94
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox95.
function checkbox95_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox95 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox95
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox96.
function checkbox96_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox96 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox96
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox97.
function checkbox97_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox97 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);
% Hint: get(hObject,'Value') returns toggle state of checkbox97


% --- Executes on button press in checkbox98.
function checkbox98_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox98 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox98
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox99.
function checkbox99_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox99 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox99
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox100.
function checkbox100_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox100 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox100
%a = double(get(hObject,'Tag'));
%handles.A(str2num(char(a(9:length(a))))) = get(hObject,'Value');
%guidata(hObject,handles);

% --- Executes on button press in checkbox101.
function checkbox101_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox101 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox101


% --- Executes on button press in checkbox102.
function checkbox102_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox102 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox102


% --- Executes on button press in checkbox103.
function checkbox103_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox103 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox103


% --- Executes on button press in checkbox104.
function checkbox104_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox104 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox104


% --- Executes on button press in checkbox105.
function checkbox105_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox105 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox105


% --- Executes on button press in checkbox106.
function checkbox106_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox106 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox106


% --- Executes on button press in checkbox107.
function checkbox107_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox107 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox107


% --- Executes on button press in checkbox108.
function checkbox108_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox108 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox108


% --- Executes on button press in checkbox109.
function checkbox109_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox109 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox109


% --- Executes on button press in checkbox110.
function checkbox110_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox110 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox110


% --- Executes on button press in checkbox111.
function checkbox111_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox111 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox111


% --- Executes on button press in checkbox112.
function checkbox112_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox112 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox112


% --- Executes on button press in checkbox113.
function checkbox113_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox113 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox113


% --- Executes on button press in checkbox114.
function checkbox114_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox114 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox114


% --- Executes on button press in checkbox115.
function checkbox115_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox115 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox115


% --- Executes on button press in checkbox116.
function checkbox116_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox116 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox116


% --- Executes on button press in checkbox117.
function checkbox117_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox117 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox117


% --- Executes on button press in checkbox118.
function checkbox118_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox118 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox118


% --- Executes on button press in checkbox119.
function checkbox119_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox119 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox119


% --- Executes on button press in checkbox120.
function checkbox120_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox120 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox120


% --- Executes on button press in checkbox121.
function checkbox121_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox121 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox121


% --- Executes on button press in checkbox122.
function checkbox122_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox122 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox122


% --- Executes on button press in checkbox123.
function checkbox123_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox123 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox123


% --- Executes on button press in checkbox124.
function checkbox124_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox124 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox124


% --- Executes on button press in checkbox125.
function checkbox125_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox125 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox125


% --- Executes on button press in checkbox126.
function checkbox126_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox126 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox126


% --- Executes on button press in checkbox127.
function checkbox127_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox127 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox127


% --- Executes on button press in checkbox128.
function checkbox128_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox128 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox128


% --- Executes on button press in checkbox129.
function checkbox129_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox129 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox129


% --- Executes on button press in checkbox130.
function checkbox130_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox130 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox130


% --- Executes on button press in checkbox131.
function checkbox131_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox131 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox131


% --- Executes on button press in checkbox132.
function checkbox132_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox132 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox132


% --- Executes on button press in checkbox133.
function checkbox133_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox133 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox133


% --- Executes on button press in checkbox134.
function checkbox134_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox134 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox134


% --- Executes on button press in checkbox135.
function checkbox135_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox135 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox135


% --- Executes on button press in checkbox136.
function checkbox136_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox136 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox136


% --- Executes on button press in checkbox137.
function checkbox137_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox137 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox137


% --- Executes on button press in checkbox138.
function checkbox138_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox138 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox138


% --- Executes on button press in checkbox139.
function checkbox139_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox139 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox139


% --- Executes on button press in checkbox140.
function checkbox140_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox140 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox140


% --- Executes on button press in checkbox141.
function checkbox141_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox141 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox141


% --- Executes on button press in checkbox142.
function checkbox142_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox142 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox142


% --- Executes on button press in checkbox143.
function checkbox143_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox143 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox143


% --- Executes on button press in checkbox144.
function checkbox144_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox144 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox144


% --- Executes on button press in checkbox145.
function checkbox145_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox145 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox145


% --- Executes on button press in checkbox146.
function checkbox146_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox146 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox146


% --- Executes on button press in checkbox147.
function checkbox147_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox147 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox147


% --- Executes on button press in checkbox148.
function checkbox148_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox148 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox148


% --- Executes on button press in checkbox149.
function checkbox149_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox149 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox149


% --- Executes on button press in checkbox150.
function checkbox150_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox150 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox150


% --- Executes on button press in checkbox151.
function checkbox151_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox151 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox151


% --- Executes on button press in checkbox152.
function checkbox152_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox152 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox152


% --- Executes on button press in checkbox153.
function checkbox153_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox153 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox153


% --- Executes on button press in checkbox154.
function checkbox154_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox154 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox154


% --- Executes on button press in checkbox155.
function checkbox155_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox155 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox155


% --- Executes on button press in checkbox156.
function checkbox156_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox156 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox156


% --- Executes on button press in checkbox157.
function checkbox157_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox157 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox157


% --- Executes on button press in checkbox158.
function checkbox158_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox158 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox158


% --- Executes on button press in checkbox159.
function checkbox159_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox159 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox159


% --- Executes on button press in checkbox160.
function checkbox160_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox160 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox160


% --- Executes on button press in checkbox161.
function checkbox161_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox161 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox161


% --- Executes on button press in checkbox162.
function checkbox162_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox162 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox162


% --- Executes on button press in checkbox163.
function checkbox163_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox163 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox163


% --- Executes on button press in checkbox164.
function checkbox164_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox164 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox164


% --- Executes on button press in checkbox165.
function checkbox165_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox165 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox165


% --- Executes on button press in checkbox166.
function checkbox166_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox166 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox166


% --- Executes on button press in checkbox167.
function checkbox167_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox167 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox167


% --- Executes on button press in checkbox168.
function checkbox168_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox168 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox168


% --- Executes on button press in checkbox169.
function checkbox169_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox169 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox169


% --- Executes on button press in checkbox170.
function checkbox170_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox170 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox170


% --- Executes on button press in checkbox171.
function checkbox171_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox171 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox171


% --- Executes on button press in checkbox172.
function checkbox172_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox172 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox172


% --- Executes on button press in checkbox173.
function checkbox173_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox173 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox173


% --- Executes on button press in checkbox174.
function checkbox174_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox174 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox174


% --- Executes on button press in checkbox175.
function checkbox175_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox175 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox175


% --- Executes on button press in checkbox176.
function checkbox176_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox176 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox176


% --- Executes on button press in checkbox177.
function checkbox177_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox177 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox177


% --- Executes on button press in checkbox178.
function checkbox178_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox178 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox178


% --- Executes on button press in checkbox179.
function checkbox179_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox179 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox179


% --- Executes on button press in checkbox180.
function checkbox180_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox180 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox180


% --- Executes on button press in checkbox181.
function checkbox181_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox181 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox181


% --- Executes on button press in checkbox182.
function checkbox182_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox182 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox182


% --- Executes on button press in checkbox183.
function checkbox183_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox183 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox183


% --- Executes on button press in checkbox184.
function checkbox184_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox184 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox184


% --- Executes on button press in checkbox185.
function checkbox185_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox185 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox185


% --- Executes on button press in checkbox186.
function checkbox186_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox186 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox186


% --- Executes on button press in checkbox187.
function checkbox187_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox187 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox187


% --- Executes on button press in checkbox188.
function checkbox188_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox188 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox188


% --- Executes on button press in checkbox189.
function checkbox189_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox189 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox189


% --- Executes on button press in checkbox190.
function checkbox190_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox190 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox190


% --- Executes on button press in checkbox191.
function checkbox191_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox191 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox191


% --- Executes on button press in checkbox192.
function checkbox192_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox192 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox192


% --- Executes on button press in checkbox193.
function checkbox193_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox193 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox193


% --- Executes on button press in checkbox194.
function checkbox194_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox194 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox194


% --- Executes on button press in checkbox195.
function checkbox195_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox195 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox195


% --- Executes on button press in checkbox196.
function checkbox196_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox196 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox196


% --- Executes on button press in checkbox197.
function checkbox197_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox197 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox197


% --- Executes on button press in checkbox198.
function checkbox198_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox198 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox198


% --- Executes on button press in checkbox199.
function checkbox199_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox199 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox199


% --- Executes on button press in checkbox200.
function checkbox200_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox200 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox200


% --- Executes on button press in pushbutton1.
function pushbutton1_Callback(hObject, eventdata, handles)
% hObject    handle to pushbutton1 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

zorA = get(handles.zorA,'Value')
if(handles.n ~= 100)
    zorA = 0;
end

if(zorA == 1)
    A = zeros(10);
    for i=1:100
        A(i) = get(handles.(strcat('checkbox',num2str(i))),'Value');
    end
    z = reshape(flipud(rot90(A)),1,100);
end

if(zorA == 0)
 fidinput = fopen('testSet');
 z = fscanf(fidinput,'%g',[1,handles.n]);
 fclose(fidinput);
 for i=1:100
    set(handles.(strcat('checkbox',num2str(i))),'Value',z(i));
    end
end
%z = reshape(flipud(rot90(A)),1,100);  
handles.orig = z;

for i=1:6

     zprime = zeros(1,handles.n);
     DS = 0;
     distN = zeros(1,handles.Nprime);
     for j = 1:handles.Nprime
        dist(j) = hamdist(handles.addressSpace(j,1:handles.n),z);
     end

     S = find(dist - handles.r<0);
     for k=1:length(S)
       zprime = zprime + handles.storageCells(S(k),1:handles.n);
       DS = DS + handles.C_Sets(S(k));
    end
       
       zprime = floor((1.999999999/DS)*zprime);
       z = zprime;
  end
handles.zprime = z;

for i=101:200
    set(handles.(strcat('checkbox',num2str(i))),'Value',z(i-100))
end
%refresh(handles.figure1);
%set(handles.('checkbox101'),'Value',1)

guidata(hObject,handles);

% --- Executes on button press in pushbutton2.
function pushbutton2_Callback(hObject, eventdata, handles)
% hObject    handle to pushbutton2 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
picture(handles.orig,handles.zprime,handles.n);


function picture(X,Y,n)

n = floor(sqrt(n));
%x = reshape(X,n,n);
%Y = reshape(Y,n,n);
%reshape(flipud(rot90(A)),1,100)
A = zeros(n+1);
B = zeros(n+1);

for i = 0:n-1;
        A(i+2,1:n) = X(i*n+1:i*n+n);
        B(i+2,1:n) = Y(i*n+1:i*n+n);
end

axis('ij')
axis('equal')

subplot(2,2,2), pcolor(flipud(A))
subplot(2,2,4), pcolor(flipud(B))
%colormap(gray(2))


% --- Executes during object creation, after setting all properties.
function nval_CreateFcn(hObject, eventdata, handles)
% hObject    handle to nval (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc
    set(hObject,'BackgroundColor','white');
else
    set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
end



function nval_Callback(hObject, eventdata, handles)
% hObject    handle to nval (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of nval as text
%        str2double(get(hObject,'String')) returns contents of nval as a double


% --- Executes during object creation, after setting all properties.
function Nprimeval_CreateFcn(hObject, eventdata, handles)
% hObject    handle to Nprimeval (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc
    set(hObject,'BackgroundColor','white');
else
    set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
end



function Nprimeval_Callback(hObject, eventdata, handles)
% hObject    handle to Nprimeval (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of Nprimeval as text
%        str2double(get(hObject,'String')) returns contents of Nprimeval as a double


% --- Executes on button press in ResetParams.
function ResetParams_Callback(hObject, eventdata, handles)
% hObject    handle to ResetParams (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)


n = str2double(get(handles.nval,'String'));
Nprime = str2double(get(handles.nval,'String'));
r = str2double(get(handles.rvalue,'String'));

buildTestSet(n,floor(n/10));
%r = ceil(n/2)- 2;
[aSpace,storage,C_SetSizes] = createMemory(n,Nprime,r,'testSet');

handles.addressSpace = aSpace;
handles.storageCells = storage;
handles.C_Sets = C_SetSizes;
handles.n = n;
handles.r = r;
handles.Nprime = Nprime;

guidata(hObject,handles);


% --- Executes during object creation, after setting all properties.
function rvalue_CreateFcn(hObject, eventdata, handles)
% hObject    handle to rvalue (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc
    set(hObject,'BackgroundColor','white');
else
    set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
end



function rvalue_Callback(hObject, eventdata, handles)
% hObject    handle to rvalue (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of rvalue as text
%        str2double(get(hObject,'String')) returns contents of rvalue as a double


% --- Executes on button press in zorA.
function zorA_Callback(hObject, eventdata, handles)
% hObject    handle to zorA (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of zorA


