Você está na página 1de 18

New: GUI

Fecha: 20-06-17
Click en static text Se asemeja al fprint

Doubl click

Tamao de letra

letra
INPUT EXTENCION .FIG

.M ESTA EL SCRIPT
Cambiam,os el nombre de edit1 a textoa y
textob
Programamos ah abajo

na=input(ingrese A); na=str2double(na);


na= str2double(get(handles.textoa,String));
nb= str2double(get(handles.textob,String));
r=na/nb;
%fprintf(el resultado es %d,r); esto ya no utilizamos

Agregamos un edit.nombre rab

Set(handles.rab,string,r)

PERO EL CODIGO REAL ES:

na= str2double(get(handles.textoa,'String'));
nb= str2double(get(handles.textob,'String'));
r=na/nb;
set(handles.rab,'String',r)

Ingresando la te
temperatura a grados Celsius convertir a grados Fahrenheit

na= str2double(get(handles.textoa,'String'));
r=(9/5)*(na)+32;
set(handles.textob,'String',r)

hallar la ecuacion de los GASES

na= str2double(get(handles.presion,'String'));
nb= str2double(get(handles.volumen,'String'));
nc= str2double(get(handles.moles,'String'));
r=0.082;
t=(na*nb)/(nc*r);
set(handles.respuesta,'String',t)
Falta clases.

Luego viene el video

Guardamos y ejecutamos.
Escribimos las formulas.

Que hacemos para tres ecuacionesdibujamos tres axes


Arreglamos las formulas..

SEGUIMOSS CON OTROS CUADROS.


GUARDAMOS Y VEMOS

AGREGAMOS UN PUSH BOTTON


Al push button .. le cambiamos nombre>> mostrar datos

Ejecutamos y colocamos cdigos.

11-07-2017

CLASES DE MARTES
Cdigos en Matlab..
x=[2 5 7 9 12 15],
y=[1 4 6 8 13 16];
datos=[x' y'];
set(handles.tabla1,'data',datos);
axes(handles.dibujo1);
plot(x,y);

Ejercicio 2

Static text
Edit text
fila=str2double(get(handles.edit1,'String'));
colum=str2double(get(handles.edit2,'String'));
num_elem=cell(fila,colum);
num_elem(:,:)={''};
set(handles.uitable1,'Data',num_elem);
set(handles.uitable1,'ColumnEditable',true(1,columnas));

Ejercicio 3
Para dar valores:.
% --- Executes on button press in pushbutton1.
function pushbutton1_Callback(hObject, eventdata, handles)
fila=str2double(get(handles.edit1,'String'));
colum=str2double(get(handles.edit2,'String'));
num_elem=cell(fila,colum);
num_elem(:,:)={''};
set(handles.uitable1,'Data',num_elem);
set(handles.uitable1,'ColumnEditable',true(1,colum));

para la grafica:
function pushbutton2_Callback(hObject, eventdata, handles)

a=str2double(get(handles.uitable1,'data'));
n=size(a,1);
axes(handles.axes1);
plot(a(:,1),a(:,2));

asi sale la grafica , luego de colocar datos..

Ejercicio 4..
Push botton

Luego creamos el archive excel guardamo con el nombre de datos, en matlab

% --- Executes on button press in pushbutton1.


function pushbutton1_Callback(hObject, eventdata, handles)
% 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)
a=xlsread('datos.xlsx',1);
set(handles.uitable1,'Data',a);
axes(handles.axes1);
plot(a(:,1),a(:,2));

Você também pode gostar