Practica matlab guide

Páginas: 13 (3046 palabras) Publicado: 28 de febrero de 2012
DIVISION DE INGENIERIAS CAMPUS
IRAPUATO-SALAMANCA

PROGRAMACION EN MATLAB

PRACTICA #8

GARCIA GONZALEZ FRANCISCO

03/08/2011

Introducción
Matlab Guide es un entorno de programación visual que ofrece Matlab para poder realizar y ejecutar programas de Simulación de una forma muy simple.

1).- Realizar una interfaz grafica de usuario que reciba dos números mediante una caja de texto para cada uno,permita elegir entre las operaciones + -, / ^ y posea un botón para realizar la operación seleccionada.

código
function varargout = Calculadora(varargin)
% CALCULADORA M-file for Calculadora.fig
% CALCULADORA, by itself, creates a new CALCULADORA or raises the existing
% singleton*.
%
% H = CALCULADORA returns the handle to a new CALCULADORA or the handle to
% the existingsingleton*.
%
% CALCULADORA('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in CALCULADORA.M with the given input arguments.
%
% CALCULADORA('Property','Value',...) creates a new CALCULADORA or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before Calculadora_OpeningFcn gets called.An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to Calculadora_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 Calculadora

% Last Modifiedby GUIDE v2.5 28-Jul-2011 09:00:14

% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @Calculadora_OpeningFcn, ...
'gui_OutputFcn', @Calculadora_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 Calculadora is made visible.
function Calculadora_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 (see VARARGIN)

% Choose default command line output for Calculadora
handles.output = hObject;

% Update handlesstructure
guidata(hObject, handles);

% UIWAIT makes Calculadora wait for user response (see UIRESUME)
% uiwait(handles.figure1);


% --- Outputs from this function are returned to the command line.
function varargout = Calculadora_OutputFcn(hObject, eventdata, handles)
% varargout cell array for returning output args (see VARARGOUT);
% hObject handle to figure
% eventdata reserved - tobe 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 edit3_Callback(hObject, eventdata, handles)
% hObject handle to edit3 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handlesand user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit3 as text
% str2double(get(hObject,'String')) returns contents of edit3 as a double


% --- Executes during object creation, after setting all properties.
function edit3_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit3 (see GCBO)
% eventdata reserved - to be defined in a future version...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • guide de matlab
  • Guia matlab-guide
  • Practica matlab
  • Matlab practicas
  • practica de matlab
  • Matlab Practica
  • Practica Matlab
  • practica de matlab

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS