⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 page_one.m

📁 关于高层建筑强风条件下风压系数计算
💻 M
字号:
function varargout = Page_One(varargin)global  Nfloors  H_bldg  Fdofs  Ndofs  RNmodes  AnL_A  AnL_B  analglobal  T  T_str  D  D_str  flnMode_shape  evectors  omega  h  % Much of this content is automatically generated by the 'guide' template.% The callbacks for objects from Page_One.fig in the 'guide' template are called here.% The variables affected by a particular callback function are listed just below as%      global variables.%% PAGE_ONE M-file for Page_One.fig%      PAGE_ONE, by itself, creates a new PAGE_ONE or raises the existing%      singleton*.%%      H = PAGE_ONE returns the handle to a new PAGE_ONE or the handle to%      the existing singleton*.%%      PAGE_ONE('Property','Value',...) creates a new PAGE_ONE using the%      given property value pairs. Unrecognized properties are passed via%      varargin to Page_One_OpeningFcn.  This calling syntax produces a%      warning when there is an existing singleton*.%%      PAGE_ONE('CALLBACK') and PAGE_ONE('CALLBACK',hObject,...) call the%      local function named CALLBACK in PAGE_ONE.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_One% Last Modified by GUIDE v2.5 23-Sep-2005 10:53:02% Begin initialization code - DO NOT EDITgui_Singleton = 1;gui_State = struct('gui_Name',       mfilename, ...                   'gui_Singleton',  gui_Singleton, ...                   'gui_OpeningFcn', @Page_One_OpeningFcn, ...                   'gui_OutputFcn',  @Page_One_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_One is made visible.function  Page_One_OpeningFcn(hObject, eventdata, handles, varargin)global  Nfloors H_bldg  Fdofs  Ndofs   RNmodes  AnL_A  AnL_B  analglobal  T  T_str  D  D_str  flnMode_shape  evectors  omega  h  handles.output = hObject;guidata(hObject, handles);set(handles.Object1_30,'string', num2str(Nfloors) )set(handles.Object1_31,'string', num2str(H_bldg) )set(handles.Object1_32,'string', num2str(Fdofs) )set(handles.Object1_33,'string', num2str(Ndofs) )set(handles.Object1_34,'string', num2str(RNmodes) )set(handles.Object1_35,'string', T_str)set(handles.Object1_36,'string', D_str)set(handles.Object1_37,'string', flnMode_shape )set(handles.Object1_38,'Value', AnL_A)set(handles.Object1_39,'Value', AnL_B)%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% --- Outputs from this function are returned to the command line.function varargout = Page_One_OutputFcn(hObject, eventdata, handles)varargout{1} = handles.output;%%%%%%%%%%%    FUNCTIONS  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%function axesA_CreateFcn(hObject, eventdata, handles)     % Must Stay!!%function Object1_30_Callback(hObject, eventdata, handles)global  Nfloors  Fdofs  NdofsNfloors_str = get(handles.Object1_30,'string');Nfloors     = str2num(Nfloors_str);       % Number of storiesNdofs       = Nfloors*Fdofs;              % Total no. of d.o.f.set(handles.Object1_33,'string',Ndofs)%function Object1_31_Callback(hObject, eventdata, handles)global  H_bldgH_bldg_str  = get(handles.Object1_31,'string');H_bldg      = str2num(H_bldg_str);        % Building height (m)%function Object1_32_Callback(hObject, eventdata, handles)global  Nfloors  Fdofs  NdofsFdofs_str   = get(handles.Object1_32,'string');Fdofs       = str2num(Fdofs_str);         % No. dynamic degrees of freedom (d.o.f.) per floorNdofs       = Nfloors*Fdofs;              % Total no. of d.o.f.set(handles.Object1_33,'string',Ndofs)%function Object1_34_Callback(hObject, eventdata, handles)global   RNmodesRNmodes_str = get(handles.Object1_34,'string');RNmodes     = str2num(RNmodes_str);       % Number of eigenmodes of vibration considered%function Object1_35_Callback(hObject, eventdata, handles)global  T  T_str  omega  RNmodesT_str       = get(handles.Object1_35,'string');T           = str2num(T_str);             % Modal period values (sec) - numericT_all       = diag(T);                    % Modal period matrix (diagonal)if length(T_all) ~= RNmodes    errordlg('Variable ''T'' not properly sized (RNmodes)')    error('Variable ''T'' not properly sized (RNmodes)')endf           = inv(T_all);                 % Modal frequency matrix (diagonal)omega       = 2*pi*f;                     % Natural circular frequencies matrix (diagonal)%function Object1_36_Callback(hObject, eventdata, handles)global   D  D_str  h  RNmodesD_str       = get(handles.Object1_36,'string');D           = str2num(D_str);             % Modal damping ratios (%) - numericif length(D) ~= RNmodes    errordlg('Variable ''D'' not properly sized (RNmodes)')    error('Variable ''D'' not properly sized (RNmodes')endD_all       = D/100;                      % Convert percentage to decimalh           = diag(D_all);                % Modal damping matrix (diagonal)function Object1_38_Callback(hObject, eventdata, handles)global   AnL_A  AnL_B  analAnL_A       = get(handles.Object1_38,'Value');  % Analysis Loads A: applied & inertialAnL_B       = 1 - AnL_A;                        % Analysis Loads B: applied onlyset(handles.Object1_39,'Value',AnL_B)if AnL_A==1    anal    ='A';                               % Value for 'Loads for Analysis' = Aelse if AnL_B==1    anal    ='B';                               % Value for 'Loads for Analysis' = Bend; end%function Object1_39_Callback(hObject, eventdata, handles)global  AnL_A  AnL_B  analAnL_B       = get(handles.Object1_39,'Value');  % Analysis Loads B: applied & inertialAnL_A       = 1 - AnL_B;                        % Analysis Loads A: applied onlyset(handles.Object1_38,'Value',AnL_A)if AnL_A==1    anal    ='A';                               % Value for 'Loads for Analysis' = Aelse if AnL_B==1    anal    ='B';                               % Value for 'Loads for Analysis' = Bend; end%function Object1_50_Callback(hObject, eventdata, handles)g=figure; set(g,'units','normalized','position',[0.57 0.46 0.25 0.22],'menubar','none','numbertitle',...    'off','resize','off');One_text=uicontrol(g,'Style','text','Units','Normalized','Position',[0.01 0.01 0.99 0.99],...    'String',[char(10) 'RNmodes' char(10) char(10) 'Variable name: RNmodes' char(10)...    'Variable size: 1 x 1' char(10) char(10) 'Description: Number of normal modes of vibration ' ...    'considered in analysis.'],'FontName','Garamond','FontSize',12);%function Object1_51_Callback(hObject, eventdata, handles)g=figure; set(g,'units','normalized','position',[0.57 0.46 0.3 0.25],'menubar','none','numbertitle',...    'off','resize','off');One_text=uicontrol(g,'Style','text','Units','Normalized','Position',[0.01 0.01 0.99 0.99],...    'String',[char(10) 'Modal Values' char(10) char(10) 'Variable names: T and D' char(10)...    'Variable sizes: 1 x RNmodes' char(10) char(10) 'Description: Period and damping values '...    'for each normal mode of vibration. Use brackets as you would if defining the range of values '...    'at the MATLAB command prompt.'],'FontName','Garamond','FontSize',12);function Object1_52_Callback(hObject, eventdata, handles)g=figure; set(g,'units','normalized','position',[0.47 0.35 0.5 0.35],'menubar','none','numbertitle',...    'off','resize','off');One_text=uicontrol(g,'Style','text','Units','Normalized','Position',[0.01 0.01 0.99 0.99],...    'String',[char(10) 'Mode Shape' char(10) char(10) 'Variable name: evectors' char(10)...    'Variable size: Ndofs x RNmodes' char(10) char(10) 'Description: Specify the file '...    'location and file name. Each column contains the ordinates defining the shape of the '...    'respective normal mode (eigenvector) of vibration (i.e., column 1 corresponds to mode 1).' char(10)...     char(10) 'The first Nfloors values of column M are the ordinates defining the modal shape that correspond to '...    'd.o.f. 1, the next Nfloors values of column M are the ordinates defining the modal shape that correspond to '...    'd.o.f. 2, and so on. Furthermore, the first value of each group of values corresponding to each d.o.f. corresponds '...    'to the first floor.'],...    'FontName','Garamond','FontSize',12);function Object1_53_Callback(hObject, eventdata, handles)global Nfloors H_bldg  Fdofs  Ndofs   RNmodes  AnL_A  AnL_B  analglobal T  T_str  D  D_str  flnMode_shape  evectors  omega  h  [fnMode_shape flMode_shape] = uigetfile({'*.mat','Matlab file (*.mat)'},['Select file '...    'containing ''evectors'' (Ndofs x RNmodes).'], flnMode_shape);if fnMode_shape==0    load ([ flnMode_shape ]);else    flnMode_shape = fullfile( flMode_shape , fnMode_shape );    load ([ flnMode_shape ]);endset(handles.Object1_37,'string', [ flnMode_shape ]);function Object1_54_Callback(hObject, eventdata, handles)g=figure; set(g,'units','normalized','position',[0.37 0.23 0.5 0.4],'menubar','none','numbertitle',...    'off','resize','off');One_text=uicontrol(g,'Style','text','Units','Normalized','Position',[0.01 0.01 0.99 0.99],...    'String',[char(10) 'Loads Considered in Analysis' char(10) char(10) 'Consideration '...    'of both the applied wind loads and the inertial loads (AnL_A) is required for '...    'the analysis of flexible buildings.' char(10) char(10) 'Note that positive and '...    'negative pressures (loaded through ''flnCp'' in Page Two) act towards and away '...    'from the building face, respectively. The non-dynamic effects of the wind forces '...    'calculated from these pressures are determined by using influence coefficients '...    '(loaded through ''flDif'' in Page Three), for which the sign convention is the same as for ' ...    'the pressures. For the calculation of dynamic effects, positive forces are forces whose direction is '...    'the same as the direction of the building''s principal axis x or y. These sign '...    'conventions are attended to internally by the program.' char(10) char(10) 'Only '...    'applied wind loads (AnL_B) need to be considered for rigid buildings.'], ...    'FontName','Garamond','FontSize',12);% --- 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 + -