Documentos de Académico
Documentos de Profesional
Documentos de Cultura
II
UNIVERSIDAD CATÓLICA DE SANTA MARÍA
ESCUELA PROFESIONAL DE INGENIERÍA MECÁNICA,
MECÁNICA ELÉCTRICA Y MECATRÓNICA
CÓDIGO : 4E04128
GUIA DE LABORATORIO Nro. 03
ASIGNATURA : MECANICA COMPUTACIONAL II
PRIMERA FASE Docentes:
Ing. Henry Christian Zegarra
GUIDE y su entorno de desarrollo. Programación de Gago. Ing. Juan Carlos Cuadros.
Interfaces Gráficas Ing. Christiam Collado Oporto.
Puntos:
Nombres y apellidos: Lira Monterola Steven luis
Código: Grupo: 09
2018248221
II. HERRAMIENTAS
1. Computador con Matlab 2017.
II.
Para cada una de las preguntas, consigne los pasos seguidos para su solución de
problema con Matlab.
6.1 Modifique el GUI calculadoraXY.fig que permita la selección del modo Estándar y
Científico. Este atento a los requerimientos solicitados por el usuario para el
funcionamiento del GUI.
Mecánica Computacional II -
2019
GUÍA DE LABORATORIO 03 MECANICA COMPUTACIONAL PAG 2/ 17
II
C Codificación
function varargout = Calculadora_LiraSteven(varargin)
% CALCULADORA_LIRASTEVEN MATLAB code for Calculadora_LiraSteven.fig
% CALCULADORA_LIRASTEVEN, by itself, creates a new CALCULADORA_LIRASTEVEN or raises the
existing
% singleton*.
%
% H = CALCULADORA_LIRASTEVEN returns the handle to a new CALCULADORA_LIRASTEVEN or the
handle to
% the existing singleton*.
%
% CALCULADORA_LIRASTEVEN('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in CALCULADORA_LIRASTEVEN.M with the given input arguments.
%
% CALCULADORA_LIRASTEVEN('Property','Value',...) creates a new CALCULADORA_LIRASTEVEN or
raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before Calculadora_LiraSteven_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to Calculadora_LiraSteven_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
if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT
Mecánica Computacional II -
2019
GUÍA DE LABORATORIO 03 MECANICA COMPUTACIONAL PAG 3/ 17
II
% --- Executes just before Calculadora_LiraSteven is made visible.
function Calculadora_LiraSteven_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% varargin command line arguments to Calculadora_LiraSteven (see VARARGIN)
% --- Outputs from this function are returned to the command line.
function varargout = Calculadora_LiraSteven_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)
Mecánica Computacional II -
2019
GUÍA DE LABORATORIO 03 MECANICA COMPUTACIONAL PAG 4/ 17
II
s=get(handles.pantalla,'string');
s=strcat(s,'-')
set(handles.pantalla,'string',s);
Mecánica Computacional II -
2019
GUÍA DE LABORATORIO 03 MECANICA COMPUTACIONAL PAG 7/ 17
II
6.1 Modifique el GUI graficadoraXY.fig que permita graficar cualquier función, así como
tabular los datos graficados.
Codificación
Mecánica Computacional II -
2019
GUÍA DE LABORATORIO 03 MECANICA COMPUTACIONAL PAG 8/ 17
II
Codificación
function varargout = Graficadora_LiraSteven(varargin)
% Graficadora_LiraSteven MATLAB code for Graficadora_LiraSteven.fig
% Graficadora_LiraSteven, by itself, creates a new Graficadora_LiraSteven or raises
the existing
% singleton*.
%
% H = Graficadora_LiraSteven returns the handle to a new Graficadora_LiraSteven or
the handle to
% the existing singleton*.
%
% Graficadora_LiraSteven('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in Graficadora_LiraSteven.M with the given input
arguments.
%
% Graficadora_LiraSteven('Property','Value',...) creates a new
Graficadora_LiraSteven or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before Graficadora_LiraSteven_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to Graficadora_LiraSteven_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
if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT
Mecánica Computacional II -
2019
GUÍA DE LABORATORIO 03 MECANICA COMPUTACIONAL PAG 9/ 17
II
% --- Executes just before Graficadora_LiraSteven is made visible.
function Graficadora_LiraSteven_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% varargin command line arguments to Graficadora_LiraSteven (see VARARGIN)
% --- Outputs from this function are returned to the command line.
function varargout = Graficadora_LiraSteven_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)
Mecánica Computacional II -
2019
GUÍA DE LABORATORIO 03 MECANICA COMPUTACIONAL PAG 10/
% handles II
empty - handles not 17
created until after all CreateFcns called
Mecánica Computacional II -
2019
GUÍA DE LABORATORIO 03 MECANICA COMPUTACIONAL PAG 11/
II 17
% --- Executes during object creation, after setting all properties.
function eTextTgra_CreateFcn(hObject, eventdata, handles)
% hObject handle to eTextTgra (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
Mecánica Computacional II -
2019
GUÍA DE LABORATORIO 03 MECANICA COMPUTACIONAL PAG 12/
II 17
Salida – Prueba
6.1 Modifique el GUI graficadoraXY.fig que permita graficar cualquier función, así como
tabular los datos graficados.
6.2 Modifique el GUI calculadoraXY.fig que permita la selección del modo Estándar y
Científico. Este atento a los requerimientos solicitados por el usuario para el
funcionamiento del GUI.
IV. CONCLUSIONES Y OBSERVACIONES (Emita al menos 4 conclusiones)
Con todas las funciones que logramos aprender podemos programar desde una calculadora
común y corriente hasta una calculadora científica.
Que podemos combinar los códigos y poder realizar una graficadora que tenga integrada la
calculadora.
Podemos concluir que se puede programar cualquier cosa que sea electrónica
Podemos modificar si queremos una calculadora con más funciones y características sin
necesidad que sea una estándar o científica
Mecánica Computacional II -
2019