Grafica Con Interfaz Matlab

Páginas: 10 (2341 palabras) Publicado: 24 de junio de 2012
* Objetivo

Realizar un programa de interfaz para la obtener la gráfica de una función, su derivada y su integral con la ayuda de la interfaz Matlab y su herramienta GUI.

* Desarrollo

* Código:

function varargout = par1(varargin)
% PAR1 MATLAB code for par1.fig
% PAR1, by itself, creates a new PAR1 or raises the existing
% singleton*.
%
% H = PAR1 returnsthe handle to a new PAR1 or the handle to
% the existing singleton*.
%
% PAR1('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in PAR1.M with the given input arguments.
%
% PAR1('Property','Value',...) creates a new PAR1 or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUIbefore par1_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to par1_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
%Imagen Lateral


% edit1 the above text tomodify the response to help par1

% Last Modified by GUIDE v2.5 21-Feb-2012 09:05:53

% Begin initialization code - DO NOT EDIT1
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @par1_OpeningFcn, ...
'gui_OutputFcn', @par1_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 EDIT1


% --- Executes just before par1 is madevisible.
function par1_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 par1 (see VARARGIN)
global ecu x;
syms x;


% Choose defaultcommand line output for par1
handles.output = hObject;
handles.p=0;
axes(handles.axes1)
img=imread('images.jpg');
axis off;
imshow(img);

%Asignacion del campo axes para la funcion a graficar
axes(handles.grafica)
x=-10:0.5:10;
handles.x=x;
handles.h=plot(0,0);
set(handles.h,'LineStyle','-','Color',[0.5 0 0]);
grid off;
set(handles.grids,'String','GRID OFF');
title('SEÑAL');handles.slider1=0.1;
set(handles.edit1,'String',handles.slider1);

% Update handles structure
guidata(hObject, handles);

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


% --- Outputs from this function are returned to the command line.
function varargout = par1_OutputFcn(hObject, eventdata, handles)
% varargout cell array for returning outputargs (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 during object creation, after setting all properties.
function axes1_CreateFcn(hObject, eventdata,handles)
% hObject handle to axes1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: place code in OpeningFcn to populate axes1


% --- Executes on slider movement.
function slider1_Callback(hObject, eventdata, handles)
% hObject handle to slider1 (see GCBO)
%...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • interfaz grafica
  • la interfaz grafica
  • Interfaz Grafica
  • Interfaz Gráfica
  • Grafica en matlab
  • Graficas MATLAB
  • Graficas En Matlab
  • Gráficas en MATLAB

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS