Code covered by the BSD License  

Highlights from
Generation of Random Variates

image thumbnail

Generation of Random Variates

by

 

generates random variates from over 870 univariate distributions

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

% Last Modified by GUIDE v2.5 19-Jan-2012 13:12:42

% Begin initialization code - DO NOT EDIT

gui_Singleton = 1;
gui_State = struct('gui_Name',       mfilename, ...
                   'gui_Singleton',  gui_Singleton, ...
                   'gui_OpeningFcn', @distributions31_OpeningFcn, ...
                   'gui_OutputFcn',  @distributions31_OutputFcn, ...
                   'gui_LayoutFcn',  [] , ...
                   'gui_Callback',   []);
if nargin && ischar(varargin{1})
    gui_State.gui_Callback = str2func(varargin{1});
end

if nargout
    [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
    gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT


% --- Executes just before distributions31 is made visible.
function distributions31_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 distributions31 (see VARARGIN)

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

% Update handles structure
guidata(hObject, handles);

% UIWAIT makes distributions31 wait for user response (see UIRESUME)
% uiwait(handles.figure1);



% --- Outputs from this function are returned to the command line.
function varargout = distributions31_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 selection change in listbox1.
function listbox1_Callback(hObject, eventdata, handles)

global hObjectB1 hObjectB2
global user_string1 

user_string = get(hObject,'String');
user_string_no = get(hObject,'Value');
if(user_string_no > 1)
    user_string1 = user_string(user_string_no);
end
set(hObjectB2,'Visible','on');
set(hObjectB1,'Visible','off');

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

% Hints: contents = cellstr(get(hObject,'String')) returns listbox1 contents as cell array
%        contents{get(hObject,'Value')} returns selected item from listbox1


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

global AA BB
global distrib distrib_full
global ftype
global hObjectL1 
global start_button

hObjectL1 = hObject;

start_button = 0;
ftype = AA(1:end,3);
distrib = BB(1:end,1);
distrib_full = BB(1:end,2);
sdf = size(distrib_full,1);
dccount = 0;
for js = 1:sdf
    if(ftype(js) > 1 & isempty(distrib_full(js)) == 0);
        dccount = dccount + 1;
        distrib_cont(dccount) = distrib_full(js);
    end
end
dc = cell(distrib_cont);
set(hObject,'String',dc);

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


% --- Executes on selection change in listbox2.
function listbox2_Callback(hObject, eventdata, handles)
% hObject    handle to listbox2 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

global hObjectB1 hObjectB2
global user_string2

user_string = get(hObject,'String');
user_string_no = get(hObject,'Value');
if(user_string_no > 1)
    user_string2 = user_string(user_string_no);
end
set(hObjectB1,'Visible','on');
set(hObjectB2,'Visible','off');
% Hints: contents = cellstr(get(hObject,'String')) returns listbox2 contents as cell array
%        contents{get(hObject,'Value')} returns selected item from listbox2


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

global AA BB
global distrib distrib_full
global ftype fnorm fxmin fxmax fwarn
global hObjectL2

hObjectL2 = hObject;

% Get Distribution Database from MS-Excel Spreadsheet.
distrib = BB(1:end,1);
distrib_full = BB(1:end,2);
sdf = size(distrib_full,1);
fxmin = AA(1:end,5);
fxmax = AA(1:end,6);
ftype = AA(1:end,3);
fnorm = AA(1:end,4);
fwarn = AA(1:end,7);
ddcount = 0;
for js = 1:sdf
    if(ftype(js) == 1 & isempty(distrib_full(js)) == 0)
        ddcount = ddcount + 1;
        distrib_disc(ddcount) = distrib_full(js);
    end
end
dd = cell(distrib_disc);
set(hObject,'String',dd);

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



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

global hObjectE5
global user_params5
global nparams

if(nparams == 5)
    user_params5 = str2double(get(hObjectE5,'String'));   
end

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


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

global hObjectE5
global nparams

hObjectE5 = hObject;

set(hObjectE5,'BackgroundColor',[1.0 0.969 0.922]);
set(hObjectE5,'Visible','off');
if(nparams == 5)
    set(hObjectE5,'Visible','on');    
end

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



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

global hObjectE4
global user_params4
global nparams

if(nparams >= 4)
    user_params4 = str2double(get(hObjectE4,'String'));    
end

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


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

global hObjectE4
global nparams

hObjectE4 = hObject;

set(hObjectE4,'BackgroundColor',[1.0 0.969 0.922]);
set(hObjectE4,'Visible','off');
if(nparams >= 4)
    set(hObjectE4,'Visible','on');
end

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



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

global hObjectE3
global user_params3
global nparams

if(nparams >= 3)
    user_params3 = str2double(get(hObjectE3,'String'));    
end

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


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

global hObjectE3
global nparams

hObjectE3 = hObject;

set(hObjectE3,'BackgroundColor',[1.0 0.969 0.922]);
set(hObjectE3,'Visible','off');
if(nparams >= 3)
    set(hObjectE3,'Visible','on');
end

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



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

global hObjectE2
global user_params2
global nparams

if(nparams >= 2)
    user_params2 = str2double(get(hObjectE2,'String'));    
end

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


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

global hObjectE2
global nparams

hObjectE2 = hObject;

set(hObjectE2,'BackgroundColor',[1.0 0.969 0.922]);
set(hObjectE2,'Visible','off');
if(nparams >= 2)
    set(hObjectE2,'Visible','on');
end

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



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

global hObjectE1
global user_params1
global nparams

if(nparams >= 1)
    user_params1 = str2double(get(hObjectE1,'String'));    
end

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


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

global hObjectE1
global nparams

hObjectE1 = hObject;

set(hObjectE1,'BackgroundColor',[1.0 0.969 0.922]);
set(hObjectE1,'Visible','off');
if(nparams >= 1)
    set(hObjectE1,'Visible','on');
end

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
%if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
%    set(hObject,'BackgroundColor',[1.0 0.969 0.922]);
%end


% --- 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)

global user_string2
global distrib_full d_indx
global hObjectB1 hObjectB2 hObjectB3 
global hObjectT1 hObjectT2 hObjectT3 hObjectT4 hObjectT5 hObjectT16
global hObjectE1 hObjectE2 hObjectE3 hObjectE4 hObjectE5 hObjectE6 hObjectE7 
global hObjectE10 hObjectE14 hObjectE15 hObjectE16 hObjectE17 hObjectE18
global user_paramsT1 user_paramsT2 user_paramsT3 user_paramsT4 user_paramsT5
global nparams

d_indx = strmatch(user_string2, distrib_full, 'exact');

user_paramsT1 = '';
user_paramsT2 = '';
user_paramsT3 = '';
user_paramsT4 = '';
user_paramsT5 = '';

text1_CreateFcn(hObjectT1, eventdata, handles)
text2_CreateFcn(hObjectT2, eventdata, handles)
text3_CreateFcn(hObjectT3, eventdata, handles)
text4_CreateFcn(hObjectT4, eventdata, handles)
text5_CreateFcn(hObjectT5, eventdata, handles)
edit6_CreateFcn(hObjectE6, eventdata, handles)
edit7_CreateFcn(hObjectE7, eventdata, handles)
edit10_CreateFcn(hObjectE10, eventdata, handles)
edit14_CreateFcn(hObjectE14, eventdata, handles)
edit15_CreateFcn(hObjectE15, eventdata, handles)
edit16_CreateFcn(hObjectE16, eventdata, handles)
edit17_CreateFcn(hObjectE17, eventdata, handles)
edit18_CreateFcn(hObjectE18, eventdata, handles)
text16_CreateFcn(hObjectT16, eventdata, handles)

nparams = fix(5 - isempty(user_paramsT1{1}) - isempty(user_paramsT2{1}) - isempty(user_paramsT3{1}) ...
           - isempty(user_paramsT4{1}) - isempty(user_paramsT5{1} + eps));
 
edit1_CreateFcn(hObjectE1, eventdata, handles)
edit2_CreateFcn(hObjectE2, eventdata, handles)
edit3_CreateFcn(hObjectE3, eventdata, handles)
edit4_CreateFcn(hObjectE4, eventdata, handles)
edit5_CreateFcn(hObjectE5, eventdata, handles)

out_string = char(['Input Values for  ' num2str(nparams) ' Parameters. Then Push "Start" Button']);
set(hObjectE16,'String',out_string);
set(hObjectB3,'Visible','on');
set(hObjectB1,'Visible','off');
set(hObjectB2,'Visible','off');



% --- 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)

global user_string1
global distrib_full d_indx
global hObjectB1 hObjectB2 hObjectB3 
global hObjectT1 hObjectT2 hObjectT3 hObjectT4 hObjectT5 hObjectT16
global hObjectE1 hObjectE2 hObjectE3 hObjectE4 hObjectE5 hObjectE6 hObjectE7 
global hObjectE10 hObjectE14 hObjectE15 hObjectE16 hObjectE17 hObjectE18
global user_paramsT1 user_paramsT2 user_paramsT3 user_paramsT4 user_paramsT5
global nparams

d_indx = strmatch(user_string1, distrib_full, 'exact');

user_paramsT1 = '';
user_paramsT2 = '';
user_paramsT3 = '';
user_paramsT4 = '';
user_paramsT5 = '';

text1_CreateFcn(hObjectT1, eventdata, handles)
text2_CreateFcn(hObjectT2, eventdata, handles)
text3_CreateFcn(hObjectT3, eventdata, handles)
text4_CreateFcn(hObjectT4, eventdata, handles)
text5_CreateFcn(hObjectT5, eventdata, handles)
edit6_CreateFcn(hObjectE6, eventdata, handles)
edit7_CreateFcn(hObjectE7, eventdata, handles)
edit10_CreateFcn(hObjectE10, eventdata, handles)
edit14_CreateFcn(hObjectE14, eventdata, handles)
edit15_CreateFcn(hObjectE15, eventdata, handles)
edit16_CreateFcn(hObjectE16, eventdata, handles)
edit17_CreateFcn(hObjectE17, eventdata, handles)
edit18_CreateFcn(hObjectE18, eventdata, handles)
text16_CreateFcn(hObjectT16, eventdata, handles)

nparams = fix(5 - isempty(user_paramsT1{1}) - isempty(user_paramsT2{1}) - isempty(user_paramsT3{1}) ...
           - isempty(user_paramsT4{1}) - isempty(user_paramsT5{1} + eps));

edit1_CreateFcn(hObjectE1, eventdata, handles)
edit2_CreateFcn(hObjectE2, eventdata, handles)
edit3_CreateFcn(hObjectE3, eventdata, handles)
edit4_CreateFcn(hObjectE4, eventdata, handles)
edit5_CreateFcn(hObjectE5, eventdata, handles)

out_string = char(['Input Values for  ' num2str(nparams) ' Parameters. Then Push "Start" Button']);
set(hObjectE16,'String',out_string);
set(hObjectB3,'Visible','on');
set(hObjectB1,'Visible','off');
set(hObjectB2,'Visible','off');


function edit6_Callback(hObject, eventdata, handles)
% hObject    handle to edit6 (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 edit6 as text
%        str2double(get(hObject,'String')) returns contents of edit6 as a double


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

global BB
global d_indx
global hObjectE6

hObjectE6 = hObject;

% Get Distribution Database from MS-Excel Spreadsheet.
xmax_distrib = BB(1:end,9);
user_xmax_dis = xmax_distrib(d_indx);
xmaxdis = cell(user_xmax_dis);
set(hObject,'String',xmaxdis);
set(hObject,'Enable','Inactive');

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


function edit7_Callback(hObject, eventdata, handles)
% hObject    handle to edit7 (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 edit7 as text
%        str2double(get(hObject,'String')) returns contents of edit7 as a double


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

global BB
global d_indx
global hObjectE7

hObjectE7 = hObject;

% Get Distribution Database from MS-Excel Spreadsheet.
xmin_distrib = BB(1:end,8);
user_xmin_dis = xmin_distrib(d_indx);
xmindis = cell(user_xmin_dis);
set(hObject,'String',xmindis);
set(hObject,'Enable','Inactive');

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


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

global hObjectE10
global iseed

iseed = str2double(get(hObjectE10,'String'));

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


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

global hObjectE10
global iseed

hObjectE10 = hObject;
iseed = 0;

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


function edit11_Callback(hObject, eventdata, handles)
% hObject    handle to edit11 (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 edit11 as text
%        str2double(get(hObject,'String')) returns contents of edit11 as a double


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

global hObjectE11
hObjectE11 = hObject;

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



function edit12_Callback(hObject, eventdata, handles)
% hObject    handle to edit12 (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 edit12 as text
%        str2double(get(hObject,'String')) returns contents of edit12 as a double


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

global hObjectE12
hObjectE12 = hObject;

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


% --- Executes during object deletion, before destroying properties.
function listbox1_DeleteFcn(hObject, eventdata, handles)
% hObject    handle to listbox1 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)


% --- Executes during object deletion, before destroying properties.
function listbox2_DeleteFcn(hObject, eventdata, handles)
% hObject    handle to listbox2 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)


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

global BB
global d_indx
global hObjectT5
global user_paramsT5

hObjectT5 = hObject;

% Get Distribution Database from MS-Excel Spreadsheet.
paramsT5 = BB(1:end,7);
user_paramsT5 = paramsT5(d_indx);
pT5 = cell(user_paramsT5);
set(hObject,'String',pT5);


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

global BB
global d_indx
global hObjectT1
global user_paramsT1

hObjectT1 = hObject;

% Get Distribution Database from MS-Excel Spreadsheet.
paramsT1 = BB(1:end,3);
user_paramsT1 = paramsT1(d_indx);
pT1 = cell(user_paramsT1);
set(hObject,'String',pT1);


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

global BB
global d_indx
global hObjectT2
global user_paramsT2

hObjectT2 = hObject;

% Get Distribution Database from MS-Excel Spreadsheet.
paramsT2 = BB(1:end,4);
user_paramsT2 = paramsT2(d_indx);
pT2 = cell(user_paramsT2);
set(hObject,'String',pT2);


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

global BB
global d_indx
global hObjectT3 
global user_paramsT3

hObjectT3 = hObject;

% Get Distribution Database from MS-Excel Spreadsheet.
paramsT3 = BB(1:end,5);
user_paramsT3 = paramsT3(d_indx);
pT3 = cell(user_paramsT3);
set(hObject,'String',pT3);


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

global BB
global d_indx
global hObjectT4
global user_paramsT4

hObjectT4 = hObject;

% Get Distribution Database from MS-Excel Spreadsheet.
paramsT4 = BB(1:end,6);
user_paramsT4 = paramsT4(d_indx);
pT4 = cell(user_paramsT4);
set(hObject,'String',pT4);


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


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


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

global hObjectB3 hObjectB4 hObjectB7
global hObjectE1 hObjectE2 hObjectE3 hObjectE4 hObjectE5
global hObjectE10 hObjectE11 hObjectE12 hObjectE16 hObjectE17
global hObjectA1 hObjectA2 hObjectA3 hObjectA4
global hObjectP1 hObjectP2 hObjectP3
global user_params1 user_params2 user_params3 user_params4 user_params5
global distrib distrib_full d_indx
global xmax_value xmin_value
global ftype fnorm fxmin fxmax fwarn
global iseed
global nsamples
global start_button save_button
global xhold fhold ghold jhold chold isint
global c_value

set(hObjectB3,'Visible','off');
set(hObjectB4,'Visible','on');
set(hObjectB7,'Visible','on');
edit11_CreateFcn(hObjectE11, eventdata, handles)
edit12_CreateFcn(hObjectE12, eventdata, handles)
edit10_Callback(hObjectE10, eventdata, handles);
edit17_Callback(hObjectE17, eventdata, handles);
edit1_Callback(hObjectE1, eventdata, handles);
edit2_Callback(hObjectE2, eventdata, handles);
edit3_Callback(hObjectE3, eventdata, handles);
edit4_Callback(hObjectE4, eventdata, handles);
edit5_Callback(hObjectE5, eventdata, handles);

start_button = 1;
save_button = 0;
p_value = [user_params1 user_params2 user_params3 user_params4 user_params5];
name = char(distrib_full(d_indx));

% Create Input Data-Structure.
userin.distrib = distrib{d_indx};
userin.p_value = p_value;
userin.d_indx = d_indx;
userin.xmax_value = xmax_value;
userin.xmin_value = xmin_value;
userin.ftype = ftype(d_indx);
userin.fnorm = fnorm(d_indx);
userin.nsamples = nsamples;
userin.name = name;
userin.fxmin = fxmin(d_indx);
userin.fxmax = fxmax(d_indx);
userin.fwarn = fwarn(d_indx);
userin.c_value = c_value;

out_string = 'Processing Started.  Please Wait.';
set(hObjectE16,'String',out_string);

%Start Processing
[xhold,fhold,ghold,jhold,chold,xsort,gsort,fsort,isint,xmax_value,xmin_value] = distribs31(userin,iseed);

ftype = userin.ftype;

%Start Plots
set(hObjectA1,'Visible','on');
set(hObjectA2,'Visible','on');
set(hObjectA3,'Visible','on');
set(hObjectA4,'Visible','on');
if(start_button == 1)
    
    if(ftype == 2)
        [xsort] = sort(fhold);
        xmin_value = xsort(1);
        xmax_value = xsort(end);
        xsort = xmin_value:(xmax_value-xmin_value)/(nsamples-1):xmax_value;
    end
    xdel = (xmax_value - xmin_value)/100;
    if(isint == 1)
        xdel = 1;
    end

    % Plot Time series.
    xx = real(xhold);
    if(ftype == 2)                          % Don't sort outputs of Inverse PPF functions until histogram plot.
        xx = fhold;
    end

    axes(hObjectA1);
    hObjectP1 = plot(jhold, xx);                         % Plot time series of noise.
    title([name ' Sample Values'])
    xlabel('Sample');
    ylabel('Value');
    if(ftype ~= 2)                          % Don't sort outputs of Inverse PPF functions until histogram plot.
        [xsort, index] = sort(xhold);
    end
    
    % Plot CDF and PDF.
    axes(hObjectA2);
    hObjectP2 = plot(0,0);
    axes(hObjectA3);
    hObjectP3 = plot(0,0); 
    if(ftype <= 4)                          % Don't plot CDF or PDF for Special Distributions, Recursive Distributions.
        for js = 1:nsamples            
            if(ftype ~= 2)                  % Don't sort outputs of Inverse PPF functions until histogram plot.
                fsort(js) = fhold(index(js));   
                if(ftype == 3)              % Don't sort PDF of PDF-only function.
                    fsort(js) = fhold(js);      
                end
                gsort(js) = ghold(index(js));
            end          
        end

        axes(hObjectA2);
        hObjectP2 = plot(xsort, gsort);				    % Plot CDF of noise.
        title([name ' CDF']);
        xlabel('X');
        ylabel('Cumulative Distribution');
        axis([xmin_value xmax_value 0 1]);
       
        xv = xsort;
        if(ftype == 3)
            xv = chold;                     % Use equispaced 'x' for PDF only functions.    
        end
        axes(hObjectA3);
        hObjectP3 = plot(xv, fsort);                     % Plot PDF of noise.
        title([name ' PDF']);
        xlabel('X');
        ylabel('Probability Density');
        ymax = max(fsort);
        ymin = min(fsort);
        if(strcmp(distrib,'genxval') == 1)
            ymax = 1;
        end
        axis([xmin_value xmax_value ymin ymax]);
    end

    % Plot Histogram.
    if(ftype == 1)
        xmin_value = xmin_value - 1.1e-7;
    end
    x = xmin_value:xdel:xmax_value;
    if(ftype == 2)
        [xsort, index] = sort(fhold);
        xdel = (xsort(end)-xsort(1))/100;
        x = xsort(1):xdel:xsort(end);
    end
    if(ftype >= 50)                         % Scale histogram to output data.
        xdel = (xsort(end)-xsort(1))/100;
        if(strcmp(distrib,'disades') == 1)
            xdel = 1; 
        end
        x1 = xsort(1);
        xend = xsort(end);
        x = x1:xdel:xend;
    end

    axes(hObjectA4);
    hist(xsort, x);  				    % Plot ordered distribution (histogram).
    title([name ' Sample Distribution']);
    xlabel('X');
    ylabel('Number of Samples');
    
end

v = genvarname([distrib{d_indx} '_samples']);
evalc([v,' = xx']);
out_string = ['Processing Completed.  ' num2str(nsamples) ' samples available in variable, "' distrib{d_indx} '_samples".'] ;
set(hObjectE16,'String',out_string);



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

global xmax_value

xmax_value = str2double(get(hObject,'String'));

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


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

global AA
global d_indx
global hObjectE14
global xmax_value

hObjectE14 = hObject;

% Get Distribution Database from MS-Excel Spreadsheet.
xmax_default = AA(1:end,2);
xmaxdef = num2str(xmax_default(d_indx));
set(hObject,'String',xmaxdef);
xmax_value = str2double(xmaxdef);

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


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

global xmin_value

xmin_value = str2double(get(hObject,'String'));

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


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

global AA BB
global d_indx
global hObjectE15
global xmin_value

hObjectE15 = hObject;

% Get Distribution Database from MS-Excel Spreadsheet.
[AA, BB] = xlsread('noise_distribs31.xls');
xmin_default = AA(1:end,1);
xmindef = num2str(xmin_default(d_indx));
set(hObject,'String',xmindef);
xmin_value = str2double(xmindef);

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


function edit16_Callback(hObject, eventdata, handles)
% hObject    handle to edit16 (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 edit16 as text
%        str2double(get(hObject,'String')) returns contents of edit16 as a double


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

global hObjectE16

hObjectE16 = hObject;
set(hObjectE16,'String','SELECT DISTRIBUTION.  Then hit "Select" Button Below.');

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


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

global hObjectE16 hObjectE18
global hObjectT16
global save_button start_button

save_button = 1;
set(hObjectT16, 'Visible', 'on')
set(hObjectE18, 'Visible', 'on')
% Save Output File.
if(start_button == 1)    
    set(hObjectE16,'String','Enter the Name of the Output File.  Then hit "Enter"');
end    
    

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

global hObjectE17
global nsamples

nsamples = str2double(get(hObjectE17,'String'));

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


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

global hObjectE17
global nsamples

hObjectE17 = hObject;
nsamples = 1000;

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


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

global hObjectB4
global hObjectE16 hObjectE18
global hObjectT16
global xhold savefile
global nsamples

savefile = get(hObject,'String');
savefile = strcat(savefile,'.dat');
fid = fopen(savefile,'w');
for js = 1:nsamples
    fprintf(fid,'%25.15f\n',xhold(js));
end
status = fclose(fid);
out_string = char(['ASCII File,  ',savefile,',  Written to Current Directory']);
set(hObjectE16,'String',out_string);
set(hObjectB4,'Visible','off')
set(hObjectT16,'Visible','off')
set(hObjectE18,'Visible','off')

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


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

global hObjectE18

hObjectE18 = hObject;

set(hObjectE18,'Visible','off');

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



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

global hObjectE20
global c_value

c_value = str2num(get(hObjectE20,'String'));
set(hObjectE20,'BackgroundColor','white');

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


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

global hObjectE20

hObjectE20 = hObject;
set(hObjectE20,'Visible','off');

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


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

global hObjectA1

hObjectA1 = hObject;
set(hObjectA1,'Visible','off');

% Hint: place code in OpeningFcn to populate axes1


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

global hObjectA2

hObjectA2 = hObject;
set(hObjectA2,'Visible','off');

% Hint: place code in OpeningFcn to populate axes2


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

global hObjectA3

hObjectA3 = hObject;
set(hObjectA3,'Visible','off');

% Hint: place code in OpeningFcn to populate axes3


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

global hObjectA4

hObjectA4 = hObject;
set(hObjectA4,'Visible','off');

% Hint: place code in OpeningFcn to populate axes4


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

global hObjectL1 hObjectL2
global hObjectB1 hObjectB2 hObjectB3 hObjectB4 hObjectB7
global hObjectP1 hObjectP2 hObjectP3
global hObjectA1 hObjectA2 hObjectA3 hObjectA4
global hObjectT1 hObjectT2 hObjectT3 hObjectT4 hObjectT5 hObjectT16
global hObjectE1 hObjectE2 hObjectE3 hObjectE4 hObjectE5 hObjectE6 hObjectE7 
global hObjectE10 hObjectE11 hObjectE12 hObjectE14 hObjectE15 hObjectE16 hObjectE17 hObjectE18 hObjectE20
global nparams
global user_params1 user_params2 user_params3 user_params4 user_params5
global iseed
global d_indx
global ftype fnorm fxmin fxmax fwarn

nparams = 0;

clear global iseed d_indx
clear global ftype fnorm fxmin fxmax fwarn
clear global user_params1 user_params2 user_params3 user_params4 user_params5

listbox1_CreateFcn(hObjectL1, eventdata, handles)
listbox2_CreateFcn(hObjectL2, eventdata, handles)
text1_CreateFcn(hObjectT1, eventdata, handles)
text2_CreateFcn(hObjectT2, eventdata, handles)
text3_CreateFcn(hObjectT3, eventdata, handles)
text4_CreateFcn(hObjectT4, eventdata, handles)
text5_CreateFcn(hObjectT5, eventdata, handles)

set(hObjectT1,'String','');
set(hObjectT2,'String','');
set(hObjectT3,'String','');
set(hObjectT4,'String','');
set(hObjectT5,'String','');
set(hObjectE1,'String','');
set(hObjectE2,'String','');
set(hObjectE3,'String','');
set(hObjectE4,'String','');
set(hObjectE5,'String','');
set(hObjectE6,'String','');
set(hObjectE7,'String','');
set(hObjectE10,'String','0');
set(hObjectE11,'String','');
set(hObjectE12,'String','');
set(hObjectE14,'String','');
set(hObjectE15,'String','');
set(hObjectE16,'String','SELECT DISTRIBUTION. Then hit "Select" Button Below.');
set(hObjectE17,'String','1000');
set(hObjectE18,'String','');
set(hObjectE20,'String','');

set(hObjectB3,'Visible','off');
set(hObjectB4,'Visible','off');
set(hObjectB7,'Visible','off');
set(hObjectE1,'Visible','off');
set(hObjectE2,'Visible','off');
set(hObjectE3,'Visible','off');
set(hObjectE4,'Visible','off');
set(hObjectE5,'Visible','off');
set(hObjectE18,'Visible','off');
set(hObjectE20,'Visible','off');
set(hObjectT16,'Visible','off');
set(hObjectA1,'Visible','off');
set(hObjectA2,'Visible','off');
set(hObjectA3,'Visible','off');
set(hObjectP1,'Visible','off');
set(hObjectP2,'Visible','off');
set(hObjectP3,'Visible','off');
axes(hObjectA4);
hist(0, 0); 
set(hObjectA4,'Visible','off');
set(hObjectB1,'Visible','off');
set(hObjectB2,'Visible','off');


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

global hObjectB3

hObjectB3 = hObject;
set(hObjectB3,'Visible','off');


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

global hObjectB4
global hObjectT16
global hObjectE18

hObjectB4 = hObject;
text16_CreateFcn(hObjectT16, eventdata, handles)
edit18_CreateFcn(hObjectE18, eventdata, handles)
set(hObjectE18,'Enable','on')


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

global hObjectB7

hObjectB7 = hObject;
set(hObjectB7,'Visible','off');


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

global hObjectT16

hObjectT16 = hObject;
set(hObjectT16,'Visible','off');


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

global hObjectB1

hObjectB1 = hObject;
set(hObjectB1,'Visible','off');


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

global hObjectB2

hObjectB2 = hObject;
set(hObjectB2,'Visible','off');


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

clear all
close(distributions31)

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

global hObjectB8

hObjectB8 = hObject;


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

Contact us