Professional Documents
Culture Documents
ELECTRICA Y MECATRÓNICA
2018
INTERFAZ GRÁFICA DE USUARIO EN MATLAB
INTRODUCCIÓN
INICIO
Ícono GUIDE.
Alinear objetos.
Editor de menú.
Editor de orden de etiqueta.
Editor del M-file.
Propiedades de objetos.
Navegador de objetos.
Grabar y ejecutar (ctrl. + T).
Para obtener la etiqueta de cada elemento de la paleta de componentes ejecutamos:
File>>Preferentes y seleccionamos Show names in component palette. Tenemos la
siguiente presentación:
Cada uno de los elementos de GUI, tiene un conjunto de opciones que podemos
acceder con click derecho.
Utilizamos push botton para crear 2 botones y tambien axis como se ve en la imagen
Cambiamos el nombre de variable a los buttom como imagen y filtro respectivamente y
de igual manera con el axes 1 a pantallla
En matlab se crea una codificacion por defecto la cual iremos modificando para llegar a
nuestro objetivo
if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT
% --- Outputs from this function are returned to the command line.
function varargout = untitled1_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)
axes(handles.axes2);
x1 = [1:0.001:15];
x2 = x1*3/9;
plot(x1,x2,'LineWidth', 2.5);
axes(handles.axes3);
x1 = [1:0.001:20];
x2 = sin(x1);
plot(x1,x2, 'yellow', 'LineWidth', 2.5);
f=c*1.8+32
k=c+273.15
help sqrt
h=sqrt(a^2+b^2)