data sharing between two GUI and with in a GUI
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
hi everyone, i am using a main GUI and a sub GUI and i created them using GUIDE. i want to pass variables from the main GUI to sub GUI and i made it using setappdata and getappdata. the code is as shown below:
setappdata(0,'sampfreq',fs);
i am able to transfer the "fs" value to the sub GUI but in the sub GUI when i am using handles to share the data with in the second GUI it is showing the error as shown below.
code:
set(handles.pp_val,'string',num2str(m));
i am using this command to display some value in the static text box.
the error i am getting is :
?? Attempt to reference field of non-structure array.
Error in ==> tr4>pbacquire_Callback at 87 set(handles.pp_val,'string',num2str(m));
can any one please suggest me to get rid of the above stated problem. please help me as i am struggling with this problem from last two weeks. please help me, thanks in advance.
0 comentarios
Respuestas (1)
Fangjun Jiang
el 15 de Jul. de 2011
Put a break point at this line and run your code, check what is the value of handles.pp_val, can you run the following command in the MATLAB command window:
get(handles.pp_val)
3 comentarios
Walter Roberson
el 15 de Jul. de 2011
That particular error would occur if handles was not a structure at all, so checking with get(handles.pp_val) would fail. class(handles) would show you what type of thing handles is.
Ver también
Categorías
Más información sobre Migrate GUIDE Apps en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!