Professional Documents
Culture Documents
Ejercicio 2: Function
Ejercicio 2: Function
n2=descomp(2);
set(handles.eddec,'string',str2double(num2str(n2)));
n3=descomp(3);
set(handles.eduni,'string',str2double(num2str(n3)));
n=str2double(n1)+str2double(n2)+str2double(n3);set(handles.edsum,'string'
,n);
end
EJERCCIO 4
% --- Executes on button press in pushbutton1.
function pushbutton1_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
A=str2double(get(handles.edA,'string'));
B=str2double(get(handles.edB,'string'));
C=str2double(get(handles.edC,'string'));
D=str2double(get(handles.edD,'string'));
E=str2double(get(handles.edE,'string'));
F=D-((D-C)*(B-E)/(B-A));
set(handles.edF,'string',num2str(F));
EJERCICIO 5