Sunteți pe pagina 1din 10

function varargout = ec(varargin) % EC MATLAB code for ec.fig % EC, by itself, creates a new EC or raises the existing % singleton*.

% % H = EC returns the handle to a new EC or the handle to % the existing singleton*. % % EC('CALLBACK',hObject,eventData,handles,...) calls the local % function named CALLBACK in EC.M with the given input arguments. % % EC('Property','Value',...) creates a new EC or raises the % existing singleton*. Starting from the left, property value pairs are % applied to the GUI before ec_OpeningFcn gets called. An % unrecognized property name or invalid value makes property application % stop. All inputs are passed to ec_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 ec % Last Modified by GUIDE v2.5 16-Feb-2012 12:46:00 % Begin initialization code - DO NOT EDIT gui_Singleton = 1; gui_State = struct('gui_Name', mfilename, ... 'gui_Singleton', gui_Singleton, ... 'gui_OpeningFcn', @ec_OpeningFcn, ... 'gui_OutputFcn', @ec_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 ec is made visible. function ec_OpeningFcn(hObject, eventdata, handles, varargin) aa=imread('asa.jpg'); image(aa) axis off % Choose default command line output for ec handles.output = hObject;

% Update handles structure guidata(hObject, handles); % UIWAIT makes ec wait for user response (see UIRESUME) % uiwait(handles.figure1);

% --- Outputs from this function are returned to the command line. function varargout = ec_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 aut_Callback(hObject, eventdata, handles) % hObject handle to aut (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 aut as text % str2double(get(hObject,'String')) returns contents of aut as a double

% --- Executes during object creation, after setting all properties. function aut_CreateFcn(hObject, eventdata, handles) % hObject handle to aut (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 % --- Executes on button press in calc. function calc_Callback(hObject, eventdata, handles) a = str2num(get(handles.aut,'String')); b = str2num(get(handles.ic,'String')); cuerd = str2num(get(handles.bb,'String')); c = str2num(get(handles.we,'String')); d = str2num(get(handles.cp,'String')); e = str2num(get(handles.wt,'String')); f = str2num(get(handles.S,'String')); CRCO = str2num(get(handles.nt,'String'));

R = str2num(get(handles.r,'String')); Ao = str2num(get(handles.ao,'String')); g = f * a * 111.85; h = c + g + d + e; i = 1 - b; j = h / i; k = b * j; DR = 0.98 * j ^ 0.308; DL = 0.334 *(j ^ (1/3) - 0.74); cuer = (0.0108 * j ^ 0.54) / (cuerd ^ 0.714 ); Vang = (2673 / DR ^ 0.829); DRc = 0.0895 * j ^ 0.391; DRcf = 0.3081 * j ^ 0.154; Vangc = (3475 / DRc ^ 0.828); BRC = 0.5107 * DR ^ 1.061; XHT = 0.4247 * j ^ 0.327; SHT = 0.0021 * j ^ 0.758; CPRC = (0.0058 * j ^ 0.506) / (CRCO ^ 0.72); XVT = 0.5914 * DR ^ 0.995; if DRc <= 3.5; CVT = 0.161 * DRc ^ 1.745; elseif DRc >= 3.5; CVT = 0.161 * DRc ^ 1.061; end CVTF = 0.909 * DRcf ^ 0.927; FL = 0.824 * DR ^ 1.056; FLRMT = 1.09 * DR ^ 1.03; FH = 0.642 * DR ^ 0.667; FW = 0.436 * DR ^ 0.697; WEE = 0.4854 * j ^ 1.015; WU = 0.4709 * j ^ 0.99; VF = 0.0038 * j ^ 0.976 * R ^ 0.65; VD = (0.85 * Ao - (Vang * (DR / 2) * 3.1416) / 30) * (3600 / 1000); VM = (73.04 * VD ^ 0.7372) / (DR ^ 1.94); VNE = 0.8215 * VM ^ 1.0565; VLR = 0.5475 * VM ^ 1.0899; PTO = 0.0764 * j ^ 1.1455; TTO = 0.0366 * j ^ 1.2107; PMC = 0.0013 * j ^ 0.9876 * VM ^ 0.976; TMC = 0.000141 * j ^ 0.9771 * VM ^ 1.3393; SIG = (cuerd * cuer) / (3.1416 * DR / 2); set(handles.wo,'String',j); set(handles.wv,'String',k); set(handles.DRP,'String',DR); set(handles.Cargadis,'String',DL); set(handles.CuerRP,'String',cuer); set(handles.Va,'String',Vang); set(handles.Vac,'String',Vangc); set(handles.drc,'String',DRc); set(handles.drcf,'String',DRcf); set(handles.brrr,'String',BRC); set(handles.cprc,'String',CPRC); set(handles.xht,'String',XHT); set(handles.sht,'String',SHT); set(handles.xvt,'String',XVT); set(handles.cvt,'String',CVT); set(handles.cvtff,'String',CVTF);

set(handles.fl,'String',FL); set(handles.flrmt,'String',FLRMT); set(handles.fh,'String',FH); set(handles.fw,'String',FW); set(handles.wee,'String',WEE); set(handles.wu,'String',WU); set(handles.vf,'String',VF); set(handles.vm,'String',VM); set(handles.vd,'String',VD); set(handles.vne,'String',VNE); set(handles.vlr,'String',VLR); set(handles.pto,'String',PTO); set(handles.tto,'String',TTO); set(handles.pmc,'String',PMC); set(handles.tmc,'String',TMC); set(handles.sig,'String',SIG); % --- Executes when selected object is changed in uipanel2. function uipanel2_SelectionChangeFcn(hObject, eventdata, handles) if hObject == handles.tur set(handles.S,'String',0.25); elseif hObject == handles.alt set(handles.S,'String',0.3); end function ic_Callback(hObject, eventdata, handles) % hObject handle to ic (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 ic as text % str2double(get(hObject,'String')) returns contents of ic as a double

% --- Executes during object creation, after setting all properties. function ic_CreateFcn(hObject, eventdata, handles) % hObject handle to ic (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 we_Callback(hObject, eventdata, handles) % hObject handle to we (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 we as text % str2double(get(hObject,'String')) returns contents of we as a double

% --- Executes during object creation, after setting all properties. function we_CreateFcn(hObject, eventdata, handles) % hObject handle to we (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 cp_Callback(hObject, eventdata, handles) % hObject handle to cp (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 cp as text % str2double(get(hObject,'String')) returns contents of cp as a double

% --- Executes during object creation, after setting all properties. function cp_CreateFcn(hObject, eventdata, handles) % hObject handle to cp (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 wt_Callback(hObject, eventdata, handles) % hObject handle to wt (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 wt as text

% double

str2double(get(hObject,'String')) returns contents of wt as a

% --- Executes during object creation, after setting all properties. function wt_CreateFcn(hObject, eventdata, handles) % hObject handle to wt (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 bb_Callback(hObject, eventdata, handles) % hObject handle to bb (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 bb as text % str2double(get(hObject,'String')) returns contents of bb as a double

% --- Executes during object creation, after setting all properties. function bb_CreateFcn(hObject, eventdata, handles) % hObject handle to bb (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 nt_Callback(hObject, eventdata, handles) % hObject handle to nt (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 nt as text % str2double(get(hObject,'String')) returns contents of nt as a double

% --- Executes during object creation, after setting all properties. function nt_CreateFcn(hObject, eventdata, handles) % hObject handle to nt (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 r_Callback(hObject, eventdata, handles) % hObject handle to r (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 r as text % str2double(get(hObject,'String')) returns contents of r as a double

% --- Executes during object creation, after setting all properties. function r_CreateFcn(hObject, eventdata, handles) % hObject handle to r (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 ao_Callback(hObject, eventdata, handles) % hObject handle to ao (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 ao as text % str2double(get(hObject,'String')) returns contents of ao as a double

% --- Executes during object creation, after setting all properties. function ao_CreateFcn(hObject, eventdata, handles) % hObject handle to ao (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

% --- Executes on button press in pregrmt. function pregrmt_Callback(hObject, eventdata, handles) % hObject handle to pregrmt (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) msgbox('Indica la longitud del helicptero de la punta de pala RP a punta de pala RC en una situacin de ms alejada entre ambas') % --- Executes on button press in pregsi. function pregsi_Callback(hObject, eventdata, handles) % hObject handle to pregsi (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) msgbox('Esta relaciona la superficie efectiva de las palas (s) sobre la superficie del disco rotor (S), asumiendo que las palas tienen una forma rectangular y cuerda constante. Sigma= (b*c)/(pi*R)')

% --- Executes on button press in pushbutton5. function pushbutton5_Callback(hObject, eventdata, handles) % hObject handle to pushbutton5 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) msgbox('Una persona de la tripulacin tiene un peso de 170 lb (77.18 kg) -Normatividad FAR-27-') % --- Executes on button press in pushbutton6. function pushbutton6_Callback(hObject, eventdata, handles) % hObject handle to pushbutton6 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) msgbox('Por la normatividad FAR-27 se considera que una persona pesa 170 lb (78.11 kg) y su equipaje 40 lb (18.16 kg)') % --- 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)

msgbox('Relaciona el peso vaco con el peso de diseo, no puede ser mayor a 1 y entre mas bajo es ms optimizado el helicptero. Los ndices de construccin actuales oscilan entre 0.5 y 0.6')

% --- 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) msgbox('Indica la longitud del helicptero de punta de pala de Rotor Principal a punta de pala Rotor de Cola en una situacin de ms alejadas entre ambas') % --- Executes on button press in pushbutton9. function pushbutton9_Callback(hObject, eventdata, % hObject handle to pushbutton9 (see GCBO) % eventdata reserved - to be defined in a future % handles structure with handles and user data msgbox('Siempre es menor a 1 y entre mas bajo sea helicptero. Los valores de ndice de construcin 0.5 y 0.6')

handles) version of MATLAB (see GUIDATA) ms optimizado es el actual oscilan entre

% --- Executes on button press in pushbutton10. function pushbutton10_Callback(hObject, eventdata, handles) % hObject handle to pushbutton10 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) msgbox('Por cada persona 170 lb (77.18 kg) -FAR-27 -')

% % % %

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

% --- Executes on button press in pushbutton12. function pushbutton12_Callback(hObject, eventdata, handles) % hObject handle to pushbutton12 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) msgbox('La normatividad FAR-27 especifca que se considera el peso de una persona como 170 lb (77.18 kg) y su respectivo equipaje 40 lb (18.6 kg)') % --- Executes on button press in pushbutton11. function pushbutton11_Callback(hObject, eventdata, handles) % hObject handle to pushbutton11 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) msgbox('Esta relaciona la superficie efectiva de las palas (s) sobre la superficie del disco rotor (S), asumiendo que las palas tienen una forma rectangular y cuerda constante.')

% --- Executes during object creation, after setting all properties. function tur_CreateFcn(hObject, eventdata, handles) % hObject handle to tur (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 uipanel2_CreateFcn(hObject, eventdata, handles) % hObject handle to uipanel2 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called

S-ar putea să vă placă și