Matlab - Soluciones para Attempt to reference field of non-structure array. GUIDE MATLAB

   
Vista:

Soluciones para Attempt to reference field of non-structure array. GUIDE MATLAB

Publicado por Felix R (28 intervenciones) el 21/07/2015 22:30:31
Buenas estoy teniendo unos dias duros, dado a este error.. alguien que sepa a que se pueda deber?

Abajo mi script , la cuestion es que .. Estoy intentando pasar datos de una gui(figure) a otra.. pero ambas contenidas en una gui en general que seria la principal.. en total son 3. 1 principal llama a la 2a. 2a llama a la 3a y pasan datos.. pero al correr de la 2 para la 3 y viceversa los datos se ven bien.. pero al hacerlo desde la principal.. me sale ese error

ERROR
Attempt to reference field of non-structure array.

Error in nuevaspersonas>BOTON1_Callback (line 87)
set(handles.lake1,'String',a);

Error in gui_mainfcn (line 95)
feval(varargin{:});

Error in nuevaspersonas (line 42)
gui_mainfcn(gui_State, varargin{:});

Error in @(hObject,eventdata)nuevaspersonas('BOTON1_Callback',hObject,eventdata,guidata(hObject))


Error while evaluating uicontrol Callback

SCRIPT

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

% Last Modified by GUIDE v2.5 21-Jul-2015 12:38:20

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

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

% Update handles structure
guidata(hObject, handles);


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


% --- Outputs from this function are returned to the command line.
function varargout = nuevaspersonas_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 BOTON1.
function BOTON1_Callback(hObject, eventdata, handles)
global a b c d e f g h

Resumen_Personal

uiwait



set(handles.lake1,'String',a);

set(handles.lake2,'String',b);

set(handles.lake3,'String',c);

set(handles.lake4,'String',d);

set(handles.lake5,'String',e);

set(handles.lake6,'String',f);

set(handles.lake7,'String',g);

set(handles.lake8,'String',h);




% --- Executes on button press in guardarySALIR.
function guardarySALIR_Callback(hObject, eventdata, handles)

close nuevaspersonas
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