Matlab - problema con gráficos en matlab

 
Vista:
sin imagen de perfil

problema con gráficos en matlab

Publicado por herney (2 intervenciones) el 23/09/2013 19:32:56
Hola de ante manos les agradezco si me pueden colaborar pues ya me estoy volviendo loco y no encuentro como hacerlo .
Bueno estoy haciendo una interfaz gráfica en matlab en la cual tengo una ventana con unos botones en la barra de herramienta (la cree con la opción editor de menú del guide) yo quiero que cuando de oprima un botón de los que están en la barra, me aparezca unas etiquetas unos axes y unos botones todo en un panel. y si oprimo otro botón, me salgan otras opciones en el mismo panel. les mando la imagen del gráfico que estoy haciendo



gracias y espero prontas respuesta
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder
Imágen de perfil de JOSE JEREMIAS CABALLERO
Val: 6.975
Oro
Ha mantenido su posición en Matlab (en relación al último mes)
Gráfica de Matlab

problema con gráficos en matlab

Publicado por JOSE JEREMIAS CABALLERO (5917 intervenciones) el 24/09/2013 16:01:03
Claro que te puedo responder lo mas pronto posible. Pero el problema es que como solo muestras la grafica de tu programa y no el codigo en si de que estas haciendo. Entonces no puedo decirte en que parte tienes que agregar alguna sentencia o que parte del codigo tienes que modificar.
Claro que puedo reproducir todo tu codigo pero hay veces eso implica en cierto manera tiempo.
Si deseas enviame tu codigo tanto el fig y el m a mi correo ademas pon tu codigo al foro de esa manera seria mas factible ver tu error.

Saludos.



Saludos.
JOSE JEREMÍAS CABALLERO
Asesorías en Matlab
programador en matlab
Servicios de programación matlab
[email protected]


http://matlabcaballero.blogspot.com

http://www.lawebdelprogramador.com/foros/Matlab/1371532-FORMA_DE_APRENDER_MATLAB.html
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar
sin imagen de perfil

problema con gráficos en matlab

Publicado por herney (2 intervenciones) el 24/09/2013 20:30:52
Hola jose gracias por responder tan pronto
bueno mira lo que yo quiero hacer es que cuando un usuario orpima el boton iniciar camara se cargue esta ventana en el panel

y si el usuario oprime el boton que dice reconocer muestre la siguiente vantana tambien en el mismo panel (pero que se borre la otra)

yo en java lo hago y es facil pero apenas estoy aprendiendo matlab. el fig de la ventana del menú lo cree solo arrastrando botones, no tiene nada de programacion y te mando el codigo de una de las ventanas a que se llama panel captura de imagenes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
function varargout = panel_cap_ima(varargin)
% Edit the above text to modify the response to help panel_cap_ima
 
% Last Modified by GUIDE v2.5 20-Sep-2013 17:36:26
 
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name',       mfilename, ...
                   'gui_Singleton',  gui_Singleton, ...
                   'gui_OpeningFcn', @panel_cap_ima_OpeningFcn, ...
                   'gui_OutputFcn',  @panel_cap_ima_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 panel_cap_ima is made visible.
function panel_cap_ima_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 panel_cap_ima (see VARARGIN)
 
% Choose default command line output for panel_cap_ima
handles.output = hObject;
axis off
% Update handles structure
guidata(hObject, handles);
 
 
% UIWAIT makes panel_cap_ima wait for user response (see UIRESUME)
% uiwait(handles.figure1);
 
 
% --- Outputs from this function are returned to the command line.
 
 
function varargout = panel_cap_ima_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)
 
% Get default command line output from handles structure
varargout{1} = handles.output;
 
 
 
% --- Executes on button press in ini_cam.
function ini_cam_Callback(hObject, eventdata, handles)
% hObject    handle to ini_cam (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
% Create a video input object.
 
%***********************************************************************
video= imaq.VideoDevice('winvideo', 1, 'YUY2_640x480');
handles.vid=video;
guidata(hObject,handles);
preview(video);
 
%***********************************************************************
 
% --- Executes on button press in btcapt_img.
function btcapt_img_Callback(hObject, eventdata, handles)
% hObject    handle to btcapt_img (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
x=handles.vid;
cd entren;
captura(x);
handles.foto=x;
guidata(hObject,handles);
 
 
 
% --- Executes on button press in pushbutton4.
function pushbutton4_Callback(hObject, eventdata, handles)
% hObject    handle to pushbutton4 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
 
 
% --- Executes on button press in pushbutton5.
function pushbutton5_Callback(hObject, eventdata, handles)
% hObject    handle to pushbutton5 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
%clear all;
%clc;
close all
 
 
 
function edit1_Callback(hObject, eventdata, handles)
% hObject    handle to edit1 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
 
% Hints: get(hObject,'String') returns contents of edit1 as text
%        str2double(get(hObject,'String')) returns contents of edit1 as a double
 
 
% --- Executes during object creation, after setting all properties.
function edit1_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit1 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called
 
% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end
 
 
% --- Executes on button press in btexamina.
function btexamina_Callback(hObject, eventdata, handles)
% hObject    handle to btexamina (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
carga_archivo=imgetfile
captura=imread(carga_archivo);
captura=imcrop(captura,[180,40,280,380]);
imshow(captura);
 
% --- Executes on button press in checkbox2.
function checkbox2_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox2 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
 
% Hint: get(hObject,'Value') returns toggle state of checkbox2
 
 
% --- Executes on button press in checkbox1.
function checkbox1_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox1 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
 
% Hint: get(hObject,'Value') returns toggle state of checkbox1
de ante manos gracias
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar