Anda di halaman 1dari 1

Turbina

% --- Executes on button press in calcular.


function calcular_Callback(hObject, eventdata, handles)
% hObject handle to calcular (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
h1 = str2double(get(handles.ingreso_h1,'string'));
v1 = str2double(get(handles.ingreso_v1,'string'));
h2 = str2double(get(handles.ingreso_h2,'string'));
v2 = str2double(get(handles.ingreso_v2,'string'));
w = str2double(get(handles.ingreso_w,'string'));

m= w/(h1-h2+(v1^2-v2^2)/2000);

set(handles.m,'string',m);

% --- Executes on button press in salir.


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

close(gcbf)

Anda mungkin juga menyukai