%This program calculates nominal Global Buckling of columns based on AISI.
%By:Ashkan Shahbazian Date: 07/12/2010
function varargout = customImage(varargin)
% CUSTOMIMAGE M-file for customImage.fig
% CUSTOMIMAGE, by itself, creates a new CUSTOMIMAGE or raises the existing
% singleton*.
%
% H = CUSTOMIMAGE returns the handle to a new CUSTOMIMAGE or the handle to
% the existing singleton*.
%
% CUSTOMIMAGE('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in CUSTOMIMAGE.M with the given input arguments.
%
% CUSTOMIMAGE('Property','Value',...) creates a new CUSTOMIMAGE or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before customImage_OpeningFunction gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to customImage_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 customImage
% Last Modified by GUIDE v2.5 27-Nov-2007 20:03:06
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @customImage_OpeningFcn, ...
'gui_OutputFcn', @customImage_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 customImage is made visible.
function customImage_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 customImage (see VARARGIN)
%load the background image into Matlab
%if image is not in the same directory as the GUI files, you must use the
%full path name of the iamge file
backgroundImage = importdata('cross_section.bmp');
%select the axes
axes(handles.axes1);
%place image onto the axes
image(backgroundImage);
%remove the axis tick marks
axis off
% handles.output = hObject;
% % Update handles structure
% guidata(hObject, handles);
% Image=importdata('ColumnEffectiveLength.png');
% %select the axes
% axes(handles.axes2);
% %place image onto the axes
% image(Image);
% %remove the axis tick marks
% axis off;
handles.output = hObject;
% % Update handles structure
guidata(hObject, handles);
%%
% --- Outputs from this function are returned to the command line.
function varargout = customImage_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;
%%
function varargout = Global_Buckling_Calculator_ASh(varargin)
%GLOBAL_BUCKLING_CALCULATOR_ASH M-file for Global_Buckling_Calculator_ASh.fig
% GLOBAL_BUCKLING_CALCULATOR_ASH, by itself, creates a new GLOBAL_BUCKLING_CALCULATOR_ASH or raises the existing
% singleton*.
%
% H = GLOBAL_BUCKLING_CALCULATOR_ASH returns the handle to a new GLOBAL_BUCKLING_CALCULATOR_ASH or the handle to
% the existing singleton*.
%
% GLOBAL_BUCKLING_CALCULATOR_ASH('Property','Value',...) creates a new GLOBAL_BUCKLING_CALCULATOR_ASH using the
% given property value pairs. Unrecognized properties are passed via
% varargin to Global_Buckling_Calculator_ASh_OpeningFcn. This calling syntax produces a
% warning when there is an existing singleton*.
%
% GLOBAL_BUCKLING_CALCULATOR_ASH('CALLBACK') and GLOBAL_BUCKLING_CALCULATOR_ASH('CALLBACK',hObject,...) call the
% local function named CALLBACK in GLOBAL_BUCKLING_CALCULATOR_ASH.M with the given input
% arguments.
%
% *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 Global_Buckling_Calculator_ASh
% Last Modified by GUIDE v2.5 07-Dec-2010 11:49:25
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @Global_Buckling_Calculator_ASh_OpeningFcn, ...
'gui_OutputFcn', @Global_Buckling_Calculator_ASh_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 Global_Buckling_Calculator_ASh is made visible.
function Global_Buckling_Calculator_ASh_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 unrecognized PropertyName/PropertyValue pairs from the
% command line (see VARARGIN)
% Choose default command line output for Global_Buckling_Calculator_ASh
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes Global_Buckling_Calculator_ASh wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout = Global_Buckling_Calculator_ASh_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 Calculate.
function Calculate_Callback(hObject, eventdata, handles)
% hObject handle to Calculate (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
GGbw=get(handles.Gbw,'String');
GGbf=get(handles.Gbf,'String');
GGbl=get(handles.Gbl,'String');
GGt=get(handles.Gt,'String');
GGE=get(handles.GE,'String');
GGNoo=get(handles.GNoo,'String');
GGKx=get(handles.GKx,'String');
GGKy=get(handles.GKy,'String');
GGKt=get(handles.GKt,'String');
GGLx=get(handles.GLx,'String');
GGLy=get(handles.GLy,'String');
GGLt=get(handles.GLt,'String');
GGFy=get(handles.GFy,'String');
% GGPY and others are variables of string type, and need to be converted to
% variables of number type before the other calculations can be done.
GGGbw=str2num(GGbw);
GGGbf=str2num(GGbf);
GGGbl=str2num(GGbl);
GGGt=str2num(GGt);
GGGE=str2num(GGE);
GGGNoo=str2num(GGNoo);
GGGKx=str2num(GGKx);
GGGKy=str2num(GGKy);
GGGKt=str2num(GGKt);
GGGLx=str2num(GGLx);
GGGLy=str2num(GGLy);
GGGLt=str2num(GGLt);
GGGFy=str2num(GGFy);
%now they converted to numbers. other calculation can be done after this
%block of code.
%Calculating Golbal or Euler Buckling for Lipped Channel based on AISI
%By: Ashkan Shahbazian Date: Dec 2010
bw=GGGbw;%outer length of web
bf=GGGbf;%outer legth of flanges
bl=GGGbl;%outer length of lips
t=GGGt;%thickness of cross section
%**************************************************************************
%SECTION PROPERTIES
%**************************************************************************
Ag=t*(bw+2*bf+2*bl-4*t); %Gross Area
disp 'Gross Area; Ag=';disp (Ag);
GGAg=num2str(Ag);
set(handles.GAg,'String',GGAg);
guidata(hObject,handles);
%*********************
Xca=((0.5*bw-bl-2*bf)*t^2+(bf^2+2*bl*bf)*t)/Ag; %centroid from left corner
Xcb=Xca-(t/2);%centroid from left corner minus half of thickness
GGXcb=num2str(Xcb);
set(handles.GXcb,'String',GGXcb);
guidata(hObject,handles);
%*********************
disp 'Xc from left corner minus half of thickness; Xc=';disp (Xcb);
Ycb=bw/2-(t/2);
GGYcb=num2str(Ycb);
set(handles.GYcb,'String',GGYcb);
guidata(hObject,handles);
%*********************
Yca=bw/2;
disp 'Yc from left corner minus half of thickness; Yc=';disp (Ycb);
J=(1/3*t^3)*((bw-2*t)+2*(bf)+2*(bl-t));%st. venant torsion constant of cross section = 1/3?li*ti^3 (unit^4)
GGJ=num2str(J);
set(handles.GJ,'String',GGJ);
guidata(hObject,handles);
%*********************
disp 'St. Venant torsion constant of cross section; J=';disp (J);
Ix1=(t+bw^3)/12;
Ix2=(((bf-2*t)*t^3)/12)+(((bf-2*t)*t)*(Yca-(t/2))^2);
Ix3=(((t*bl^3)/12)+((t*bl)*((Yca-(bl/2))^2)));
Ixx=Ix1+2*Ix2+2*Ix3;
GGIxx=num2str(Ixx);
set(handles.GIxx,'String',GGIxx);
guidata(hObject,handles);
%*********************
disp 'Moment of Inertia about x-axis; Ixx=';disp (Ixx);
Iy1=(((bw*t^3)/12)+((bw*t)*Xca^2));
Iy2=(((t*(bf-1*t)^3)/12)+(((bf-2*t)*t)*(((bf-2*t)/2)+t-Xca)^2));
Iy3=(((bl*t^3)/12)+((bl*t)*(bf-(t/2)-Xca)^2));
Iyy=Iy1+2*Iy2+2*Iy3;
GGIyy=num2str(Iyy);
set(handles.GIyy,'String',GGIyy);
guidata(hObject,handles);
%*********************
disp 'Moment of Inertia about y-axis; Iyy=';disp (Iyy);
%**************************************************************************
%**************************************************************************
%OPEN CROSS SECTION PROPERTIES
a=bw-t;
b=bf-t;
c=bl-(t/2);
xbar=Xcb;
Yo=0;%position of shear centre from c.g.
disp 'shear centre from c.g.; Yo=';disp (Yo);
ms=(b*(3*a^2*b+c*(6*a^2-8*c^2)))/(a^3+6*a^2*b+c*(8*c^2-12*a*c+6*a^2));
GGms=num2str(ms);
set(handles.Gms,'String',GGms);
guidata(hObject,handles);
%*********************
disp 'Xs or ms=';disp (ms);
Xo=-(ms-t/2)-Xcb;%position of shear centre from c.g.
disp 'shear centre from c.g.; Xo=';disp (Xo);
%Calculating warping constant of torsion of cross section
Cw=((2*a^3*b+3*a^2*b^2+48*c^4+112*b*c^3+8*a*c^3+48*a*b*c^2+12*a^2*c^2+12*a^2*b*c+6*a^3*c)/(6*a^2*b+(a+2*c)^3-24*a*c^2))*(a^2*b^2*t/12);
GGCw=num2str(Cw);
set(handles.GCw,'String',GGCw);
guidata(hObject,handles);
%*********************
disp 'warping constant of torsion of cross section; Cw=';disp (Cw);
%**************************************************************************
%Caculating critical buckling loads
%**************************************************************************
E=GGGE;%Elastic Modulus
Noo=GGGNoo;
kx=GGGKx;%Effective Length Factor
ky=GGGKy;%Effective Length Factor
kt=GGGKt;%Effective Length Factor
Lx=GGGLx;%unbraced length of column
Ly=GGGLy;%unbraced length of column
Lt=GGGLt;%unbraced length of column
G=(E/(2*(1+Noo)));
rx=(Ixx/Ag)^0.5;
disp 'radius of gyration of cross section about x-axis; rx=';disp (rx);
ry=(Iyy/Ag)^0.5;
disp 'radius of gyration of cross section about y-axis; ry=';disp (ry);
ro=(rx^2+ry^2+Xo^2)^0.5;
disp 'polar radius of gyration of cross section about shear centre; ro=';disp (ro);
Pex=((pi^2*E*Ixx)/(kx*Lx)^2);
disp 'Euler Flexural Buckling load about x-axis; Pex=';disp (Pex);
Pey=((pi^2*E*Iyy)/(ky*Ly)^2);
disp 'Euler Flexural Buckling load about y-axis; Pey=';disp (Pey);
Pet=((((pi^2*E*Cw)/(kt*Lt)^2)+G*J)*(1/ro^2));
disp 'Torsional Buckling load about z-axis; Pet=';disp (Pet);
%for singly symmetric shapes like lipped channel
Pcr1=Pey;
GGPcr1=num2str(Pcr1);
set(handles.GPcr1,'String',GGPcr1);
guidata(hObject,handles);
%*********************
disp 'Critical Flexural Buckling load about y-axis; Pcr1=';disp (Pcr1);
Beta=1-(Xo/ro)^2;
PP1=Pex+Pet;
PP2=((PP1)^2-4*Beta*Pex*Pet)^0.5;
Pcr2=(1/(2*Beta))*(PP1+PP2);
GGPcr2=num2str(Pcr2);
set(handles.GPcr2,'String',GGPcr2);
guidata(hObject,handles);
%*********************
disp 'First Critical Torsional-Flexural Buckling load; Pcr2=';disp (Pcr2);
Pcr3=(1/(2*Beta))*(PP1-PP2);
GGPcr3=num2str(Pcr3);
set(handles.GPcr3,'String',GGPcr3);
guidata(hObject,handles);
%*********************
disp 'Second Critical Torsional-Flexural Buckling load; Pcr3=';disp (Pcr3);
Pcrr=min(Pcr2,Pcr3);
Pcre=min(Pcr1,Pcrr);
GGPcre=num2str(Pcre);
set(handles.GPcre,'String',GGPcre);
guidata(hObject,handles);
%*********************
disp 'SUMMARY';disp (Pcre)
if Pcre==Pcr1;
disp 'Flexural Buckling Load Controls'
elseif Pcre==Pcr2;
disp 'Torsional-Flexural Load Controls'
else Pcre==Pcr3;
disp 'Torsional-Flexural Load Controls'
end
%++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
%Calculating Nominal Global load based on AISI
%++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Fy=GGGFy;%Yield stress
Py=Ag*Fy;
LandaC=(Py/Pcre)^0.5;
if LandaC<=1.5
Pne=(0.658^((LandaC)^2))*Py;
elseif LandaC>1.5
Pne=(0.877/LandaC^2)*Py;
end
GGPne=num2str(Pne);
set(handles.GPne,'String',GGPne);
guidata(hObject,handles);
%*********************
disp 'Nominal Global Buckling Load; Pne=';disp (Pne);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function GE_Callback(hObject, eventdata, handles)
% hObject handle to GE (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 GE as text
% str2double(get(hObject,'String')) returns contents of GE as a double
input=str2num(get(hObject,'String'));
if (isempty(input))
set(hObject,'String','0')
end
guidata(hObject,handles);
% --- Executes during object creation, after setting all properties.
function GE_CreateFcn(hObject, eventdata, handles)
% hObject handle to GE (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 && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function GLx_Callback(hObject, eventdata, handles)
% hObject handle to GLx (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 GLx as text
% str2double(get(hObject,'String')) returns contents of GLx as a double
input=str2num(get(hObject,'String'));
if (isempty(input))
set(hObject,'String','0')
end
guidata(hObject,handles);
% --- Executes during object creation, after setting all properties.
function GLx_CreateFcn(hObject, eventdata, handles)
% hObject handle to GLx (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 && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function GLy_Callback(hObject, eventdata, handles)
% hObject handle to GLy (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 GLy as text
% str2double(get(hObject,'String')) returns contents of GLy as a double
input=str2num(get(hObject,'String'));
if (isempty(input))
set(hObject,'String','0')
end
guidata(hObject,handles);
% --- Executes during object creation, after setting all properties.
function GLy_CreateFcn(hObject, eventdata, handles)
% hObject handle to GLy (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 && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function GLt_Callback(hObject, eventdata, handles)
% hObject handle to GLt (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 GLt as text
% str2double(get(hObject,'String')) returns contents of GLt as a double
input=str2num(get(hObject,'String'));
if (isempty(input))
set(hObject,'String','0')
end
guidata(hObject,handles);
% --- Executes during object creation, after setting all properties.
function GLt_CreateFcn(hObject, eventdata, handles)
% hObject handle to GLt (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 && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function GNoo_Callback(hObject, eventdata, handles)
% hObject handle to GNoo (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 GNoo as text
% str2double(get(hObject,'String')) returns contents of GNoo as a double
input=str2num(get(hObject,'String'));
if (isempty(input))
set(hObject,'String','0')
end
guidata(hObject,handles);
% --- Executes during object creation, after setting all properties.
function GNoo_CreateFcn(hObject, eventdata, handles)
% hObject handle to GNoo (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 && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function GKx_Callback(hObject, eventdata, handles)
% hObject handle to GKx (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 GKx as text
% str2double(get(hObject,'String')) returns contents of GKx as a double
input=str2num(get(hObject,'String'));
if (isempty(input))
set(hObject,'String','0')
end
guidata(hObject,handles);
% --- Executes during object creation, after setting all properties.
function GKx_CreateFcn(hObject, eventdata, handles)
% hObject handle to GKx (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 && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function GKy_Callback(hObject, eventdata, handles)
% hObject handle to GKy (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 GKy as text
% str2double(get(hObject,'String')) returns contents of GKy as a double
input=str2num(get(hObject,'String'));
if (isempty(input))
set(hObject,'String','0')
end
guidata(hObject,handles);
% --- Executes during object creation, after setting all properties.
function GKy_CreateFcn(hObject, eventdata, handles)
% hObject handle to GKy (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 && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function GKt_Callback(hObject, eventdata, handles)
% hObject handle to GKt (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 GKt as text
% str2double(get(hObject,'String')) returns contents of GKt as a double
input=str2num(get(hObject,'String'));
if (isempty(input))
set(hObject,'String','0')
end
guidata(hObject,handles);
% --- Executes during object creation, after setting all properties.
function GKt_CreateFcn(hObject, eventdata, handles)
% hObject handle to GKt (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 && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function GFy_Callback(hObject, eventdata, handles)
% hObject handle to GFy (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 GFy as text
% str2double(get(hObject,'String')) returns contents of GFy as a double
input=str2num(get(hObject,'String'));
if (isempty(input))
set(hObject,'String','0')
end
guidata(hObject,handles);
% --- Executes during object creation, after setting all properties.
function GFy_CreateFcn(hObject, eventdata, handles)
% hObject handle to GFy (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 && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function Gbw_Callback(hObject, eventdata, handles)
% hObject handle to Gbw (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 Gbw as text
% str2double(get(hObject,'String')) returns contents of Gbw as a double
input=str2num(get(hObject,'String'));
if (isempty(input))
set(hObject,'String','0')
end
guidata(hObject,handles);
% --- Executes during object creation, after setting all properties.
function Gbw_CreateFcn(hObject, eventdata, handles)
% hObject handle to Gbw (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 && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function Gbf_Callback(hObject, eventdata, handles)
% hObject handle to Gbf (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 Gbf as text
% str2double(get(hObject,'String')) returns contents of Gbf as a double
input=str2num(get(hObject,'String'));
if (isempty(input))
set(hObject,'String','0')
end
guidata(hObject,handles);
% --- Executes during object creation, after setting all properties.
function Gbf_CreateFcn(hObject, eventdata, handles)
% hObject handle to Gbf (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 && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function Gbl_Callback(hObject, eventdata, handles)
% hObject handle to Gbl (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 Gbl as text
% str2double(get(hObject,'String')) returns contents of Gbl as a double
input=str2num(get(hObject,'String'));
if (isempty(input))
set(hObject,'String','0')
end
guidata(hObject,handles);
% --- Executes during object creation, after setting all properties.
function Gbl_CreateFcn(hObject, eventdata, handles)
% hObject handle to Gbl (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 && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function Gt_Callback(hObject, eventdata, handles)
% hObject handle to Gt (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 Gt as text
% str2double(get(hObject,'String')) returns contents of Gt as a double
input=str2num(get(hObject,'String'));
if (isempty(input))
set(hObject,'String','0')
end
guidata(hObject,handles);
% --- Executes during object creation, after setting all properties.
function Gt_CreateFcn(hObject, eventdata, handles)
% hObject handle to Gt (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 && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end