📄 page_three.m
字号:
function varargout = Page_Three(varargin)global flnMem flDif flnProps mem_list props WS WS_str WD WD_strglobal MRI MRI_str mri IMdir_A IMdir_B intmeth mem_out% Much of this content is automatically generated by the 'guide' template.% The callbacks for objects from Page_Three.fig in the 'guide' template are called here.% The variables affected by a particular callback function are listed just below as% global variables.%% PAGE_THREE M-file for Page_Three.fig% PAGE_THREE, by itself, creates a new PAGE_THREE or raises the existing% singleton*.%% H = PAGE_THREE returns the handle to a new PAGE_THREE or the handle to% the existing singleton*.%% PAGE_THREE('Property','Value',...) creates a new PAGE_THREE using the% given property value pairs. Unrecognized properties are passed via% varargin to Page_Three_OpeningFcn. This calling syntax produces a% warning when there is an existing singleton*.%% PAGE_THREE('CALLBACK') and PAGE_THREE('CALLBACK',hObject,...) call the% local function named CALLBACK in PAGE_THREE.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 Page_Three% Last Modified by GUIDE v2.5 13-Sep-2005 14:07:47% Begin initialization code - DO NOT EDITgui_Singleton = 1;gui_State = struct('gui_Name', mfilename, ... 'gui_Singleton', gui_Singleton, ... 'gui_OpeningFcn', @Page_Three_OpeningFcn, ... 'gui_OutputFcn', @Page_Three_OutputFcn, ... 'gui_LayoutFcn', [], ... 'gui_Callback', []);if nargin & isstr(varargin{1}) gui_State.gui_Callback = str2func(varargin{1});endif 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 Page_Three is made visible.function Page_Three_OpeningFcn(hObject, eventdata, handles, varargin)global flnMem flDif flnProps mem_list props WS WS_str WD WD_strglobal MRI MRI_str mri IMdir_A IMdir_B intmeth mem_outhandles.output = hObject;guidata(hObject, handles);set(handles.Object3_30,'String', flnMem )set(handles.Object3_31,'String', flDif )set(handles.Object3_32,'String', flnProps )set(handles.Object3_33,'String', WS_str )set(handles.Object3_34,'String', WD_str )set(handles.Object3_35,'String', MRI_str )set(handles.Object3_36,'Value', IMdir_A)set(handles.Object3_37,'Value', IMdir_B)%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% --- Outputs from this function are returned to the command line.function varargout = Page_Three_OutputFcn(hObject, eventdata, handles)varargout{1} = handles.output;%%%%%%%%%%%%%%%%% FUNCTIONS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%function axesA_CreateFcn(hObject, eventdata, handles) % Must Stay!!function Object3_33_Callback(hObject, eventdata, handles)global WS WS_strWS_str = get(handles.Object3_33,'string');WS = str2num(WS_str); % Wind speeds (m/s) - numericfunction Object3_34_Callback(hObject, eventdata, handles)global WD WD_strWD_str = get(handles.Object3_34,'string');WD = str2num(WD_str); % Wind directions (degrees) - numericfunction Object3_35_Callback(hObject, eventdata, handles)global MRI MRI_strMRI_str = get(handles.Object3_35,'string');MRI = str2num(MRI_str); % Mean recurrence intervals (yr) - numericfunction Object3_36_Callback(hObject, eventdata, handles)global IMdir_A IMdir_B intmethIMdir_A = get(handles.Object3_36,'Value'); % Interpolation Method A: between WS and WDIMdir_B = 1 - IMdir_A; % Interpolation Method B: between WS, larger WD set(handles.Object3_37,'Value',IMdir_B)if IMdir_A==1 intmeth = 'A'; % Value for 'Interpolation Method' = Aelse if IMdir_B==1 intmeth = 'B'; % Value for 'Interpolation Method' = Bend; endfunction Object3_37_Callback(hObject, eventdata, handles)global IMdir_A IMdir_B intmethIMdir_B = get(handles.Object3_37,'Value'); % Interpolation Method B: between WS, larger WDIMdir_A = 1 - IMdir_B; % Interpolation Method A: between WS and WDset(handles.Object3_36,'Value',IMdir_A)if IMdir_A==1 intmeth ='A'; % Value for 'Interpolation Method' = Aelse if IMdir_B==1 intmeth ='B'; % Value for 'Interpolation Method' = Bend; endfunction Object3_50_Callback(hObject, eventdata, handles)g=figure;set(g,'units','normalized','position',[0.45 0.35 0.50 0.25],'menubar','none','numbertitle',... 'off','resize','off');Three_text=uicontrol(g,'Style','text','Units','Normalized','Position',[0.01 0.01 0.99 0.99],... 'String',[char(10) 'Frame Numbers' char(10) char(10) 'Variable name: mem_list' char(10)... 'Variable size: 1 x any' char(10) char(10) 'Description: Open the file that contains a '... 'list of the members for which the wind effects of interest are calculated. Members '... 'are identified by their numbers in the structural analysis program being used. The '... 'structural analysis program is used to calculate influence coefficients and internal '... 'forces due to gravity loads.'],'FontName','Garamond','FontSize',12);function Object3_51_Callback(hObject, eventdata, handles)g=figure;set(g,'units','normalized','position',[0.08 0.05 0.90 0.50],'menubar','none','numbertitle',... 'off','resize','off');Three_text=uicontrol(g,'Style','text','Units','Normalized','Position',[0.01 0.01 0.99 0.99],... 'String',[char(10) 'Dynamic Influence Coefficients' char(10) 'Variable name: dif' ... char(10) 'Variable size: [Ndofs+Ntaps] x 6' char(10) 'Description: Specify the file '... 'location. File names should be ''dif_memno'' where ''memno'' is a member number. For '... 'example, ''dif_111'' is the name of a file that contains a matrix called ''dif'' for '... 'member 111. Each matrix, dif, contains member internal forces induced by a unit load '... 'applied at each floor''s center of mass for each Fdofs (Page 1) and at each pressure '... 'tap (perpendicular to building face). The influence coefficient files are obtained '... 'from a separate analysis.' char(10) char(10) 'Rows contain (in six columns) the six '... 'internal forces (listed below) induced by a unit load applied at the center of mass '... 'at each floor (1 to Nfloors) for the direction corresponding to d.o.f. 1. The next '... '''Nfloors'' rows contain internal forces for the direction corresponding to d.o.f. 2,'... 'and so forth. The final ''Ntaps'' rows contain internal forces induced by unit loads '... 'applied at each tap.' char(10) char(10) 'It is IMPORTANT that the order of rows '... 'within this last group match the order of the taps listed in the pressure '... 'coefficient files (flnCp, Page 2).' char(10) 'The matrix columns are as follows:' ... char(10) '1) axial (P)' char(10) '2) local 2 axis shear (V2)' char(10) '3) local 3 '... 'axis shear (V3)' char(10) '4) torque (T)' char(10) '5) local 2 axis moment (M2)'... char(10) '6) local 3 axis moment (M3).' char(10) 'Assure proper units!'],... 'FontName','Garamond','FontSize',12);function Object3_52_Callback(hObject, eventdata, handles)g=figure;set(g,'units','normalized','position',[0.45 0.08 0.50 0.41],'menubar','none','numbertitle',... 'off','resize','off');Three_text=uicontrol(g,'Style','text','Units','Normalized','Position',[0.01 0.01 0.99 0.99],... 'String',[char(10) 'Frame properties' char(10) char(10) 'Variable name: props' char(10)... 'Variable size: length(mem_list) x 5' char(10) 'Description: Open the file that '... 'contains the nominal strength properties (listed below) for all members in '... '''mem_list''.' char(10) char(10) 'The first column contains all member numbers.'... char(10) 'IMPORTANT: The order of member numbers must match the order of the internal '... 'forces due to gravity loads in Page 4 AND the order in ''mem_list''.' char(10) 'The '... 'second and third columns contain the nominal strength in tension (Pnt) and '... 'compression (Pnc), respectively.' char(10) 'The fourth and fifth columns contain the '... 'nominal flexural strength about local axis 2 (Mn2) and local axis 3 (Mn3).' char(10) ... char(10) 'Assure proper units!'],'FontName','Garamond','FontSize',12);function Object3_53_Callback(hObject, eventdata, handles)g=figure;set(g,'units','normalized','position',[0.35 0.45 0.60 0.50],'menubar','none','numbertitle',... 'off','resize','off');Three_text=uicontrol(g,'Style','text','Units','Normalized','Position',[0.01 0.01 0.99 0.99],... 'String',[char(10) 'Wind speed and directions' char(10) char(10) 'Variable name: WS, '... 'WD and MRI' char(10) 'Variable size: any' char(10) 'Description: Specify the wind '... 'speed and wind direction values: the peak wind effect of interest will be calculated '... 'for each combination of these two variables, thus creating a table that is saved in '... 'Run 1 on Page 6. This table is used to generate peak wind effects associated with the '... 'mean-recurrence intervals specified in MRI.' char(10) char(10) 'The wind speeds must '... 'include the speeds of interest found in the hurricane or non-hurricane database. A '... 'large speed increment improves program speed, but may affect wind effect results.' ... char(10) char(10) 'Each wind direction value must have an associated pressure '... 'coefficient file.' char(10) char(10) 'Use brackets as you would if defining the range '... 'of values at the Matlab command prompt.' char(10) char(10) 'The peak wind effect is '... 'calculated very quickly at each mean recurrence interval so a large range of values '... 'for MRI is OK.'],'FontName','Garamond','FontSize',12);function Object3_54_Callback(hObject, eventdata, handles)g=figure;set(g,'units','normalized','position',[0.35 0.26 0.48 0.33],'menubar','none','numbertitle',... 'off','resize','off');Three_text=uicontrol(g,'Style','text','Units','Normalized','Position',[0.01 0.01 0.99 0.99],... 'String',[char(10) 'Interpolation Method for Direction' char(10) char(10) 'For '... 'increased program efficiency, a matrix of peak wind effects extracted from the time '... 'histories of peak effects is created for combinations of wind speeds and wind '... 'directions defined earlier on this page.' char(10) char(10) 'The user has the option '... 'of using Method A or Method B. Method A interpolates linearly between wind speeds '... '(WS) and wind directions (WD).' char(10) char(10) 'Method B interpolates linearly '... 'between wind speeds, but considers only the larger of the two values corresponding to '... 'the two bounding wind directions for each sector. Method B is slightly conservative.'],... 'FontName','Garamond','FontSize',12);function Object3_55_Callback(hObject, eventdata, handles)global flnMem flDif flnProps mem_list props WS WS_str WD WD_strglobal MRI MRI_str mri IMdir_A IMdir_B intmeth mem_out[fnMem flMem] = uigetfile({'*.mat','Matlab file (*.mat)'},['Select file containing ''mem_'... 'list'' (1 x any).'], flnMem);if fnMem==0 load ([ flnMem ]);else flnMem = fullfile( flMem , fnMem ); load ([ flnMem ]);endset(handles.Object3_30,'string', [ flnMem ]);function Object3_56_Callback(hObject, eventdata, handles)global flnMem flDif flnProps mem_list props WS WS_str WD WD_strglobal MRI MRI_str mri IMdir_A IMdir_B intmeth mem_out[ flDifx ]= uigetdir([cd '\Cp_tr\'], 'Select a file containing ''dif'' ([Ndofs+Ntaps] x 6).' );if flDifx==0 set(handles.Object3_31,'string', [ flDif '\']);else flDif=flDifx; set(handles.Object3_31,'string', [ flDif '\']);endfunction Object3_57_Callback(hObject, eventdata, handles)global flnMem flDif flnProps mem_list props WS WS_str WD WD_strglobal MRI MRI_str mri IMdir_A IMdir_B intmeth mem_out[fnProps flProps]= uigetfile({'*.mat','Matlab file (*.mat)'},['Select file containing '... '''props'' (length(mem_list) x 5).'], flnProps);if fnProps==0 load ([ flnProps ]);else flnProps = fullfile( flProps , fnProps ); load ([ flnProps ]);endset(handles.Object3_32,'string', [ flnProps ]);% --- Executes on button press in Exit_Button.function Exit_Button_Callback(hObject, eventdata, handles)close all
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -