You are on page 1of 3

EXAMEN DE PRACTICA DE METODOS NUMERICOS PARA INGENIERIA DE LA UNIDAD I:

APELLIDOS Y NOMBRES:…NICOLAS OLASCUAGA KEVIN YAIR ……………………………………………….

INSTRUCCIONES:

Elaborar el correspondiente programa de acuerdo al diseño del Interfaz que se muestra.


Realice la programación en una hoja aparte ubicando el lugar donde corresponde dicha
programación que esta signada con un número y entre paréntesis en la hoja del editor que se
encuentra después del diseño del interfaz. En la hoja aparte, ponga el número donde
considera que va la programación en la hoja del editor y programe. El programa debe graficar
2 funciones reales de una variable real en cierto intervalo [ a , b ] simultáneamente. Una vez
que termino súbalo a la plataforma Moodle en la semana 8 habilitado con el nombre de
EXAMEN UNIDAD I.

% --- Executes just before GRAFICAFUNCIONES is made visible.


function GRAFICAFUNCIONES_OpeningFcn(hObject, eventdata, handles,
varargin)

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

% --- Outputs from this function are returned to the command line.
function varargout = GRAFICAFUNCIONES_OutputFcn(hObject, eventdata,
handles)

(12)
% 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;

% --- Executes on button press in pushbutton1.


function pushbutton1_Callback(hObject, eventdata, handles)

(14)
% 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)

(16)
% --- Executes on button press in pushbutton2.
function pushbutton2_Callback(hObject, eventdata, handles)

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

(20)
% --- Executes on button press in pushbutton3.
function pushbutton3_Callback(hObject, eventdata, handles)

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

(24)
% hObject handle to edit1 (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 edit1 as text


% str2double(get(hObject,'String')) returns contents of edit1
as a double
% --- Executes during object creation, after setting all properties.
function edit1_CreateFcn(hObject, eventdata, handles)

(26)
% hObject handle to edit1 (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 edit2_Callback(hObject, eventdata, handles)

(28)
% hObject handle to edit2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
function pushbutton1_Callback(hObject, eventdata, handles)

(14)
f=get(handles.edit1,'string');
g=get(handles.edit2,'stringon');
a=str2num(get(handles.edit3,'string'));
b=str2num(get(handles.edit4,'string'));
%grafica
x=a:0.01:b;
y=eval(f);
plot(x,y)
hold on
x=a:0.01:b;
y=eval(g);
plot(x,y)
hold off

function pushbutton2_Callback(hObject, eventdata, handles)


(18)
set(handles.edit1,'string','');
set(handles.edit2,'string','');
set(handles.edit3,'string','');
set(handles.edit4,'string','');
plot(0,0)

function pushbutton3_Callback(hObject, eventdata, handles)


(22)
close

You might also like