3 questions about guide

1 vue (au cours des 30 derniers jours)
Cineva Slobozia
Cineva Slobozia le 25 Mai 2011
hy and i'm glad i joined this community with so many experts - im not one of them :(. hope someone can help me. i do have some problems with guide and my gui. # 1st. i have to make a big project, with many different figures.its about a digital signals platform. i've made my template with my most important content, that doesn't change in the rest of the figures( menues, toolbars, and some static text and buttons). the first problem is how to code the menu items so when i open, lets say lab1/something, the current window close and open the something.fig from folder lab1. i used closereq; openfig('C:\snumerice\lab1\esantionare.fig'); but if i use this combination the new window opened doesn't initialize OpeningFcn callback and its preatty useless. what should i use? # 2nd. i have a static text that initialise at OpeningFcn with a string from an external file. the problem is that the file is txt and its pretty ugly with no formating at all. i want to initialise a .rtf or BETTER a word document with all its formating. is there any combination so i can modify String of a static text with content of a word doc? and# 3rd.i have read so much help files, but i still don't know how to make some global variables, to be used in the .m file. where can i define them so they could be used in my .m file from my gui, ex in a callback from one of my buttons and the same variable in another callback from other button.
Thx and i really hope someone cand help me with my questions.
  2 commentaires
Arturo Moncada-Torres
Arturo Moncada-Torres le 25 Mai 2011
As a tip, try asking different questions in different posts please ;-) !
Cineva Slobozia
Cineva Slobozia le 25 Mai 2011
next time i'll do. thx
after i'll understand how can i resolve my problems.

Connectez-vous pour commenter.

Réponse acceptée

Arturo Moncada-Torres
Arturo Moncada-Torres le 25 Mai 2011
Regarding your Question #2, I suggest you take a look at the following file from the File Exchange.
Regarding your Question #3, you can use the handles structure. There, you can store variables that have a scope for all the callbacks. For example:
% Callback from element 1
% Choose default output
handles.output = hObject;
% ...
handles.myVariable = 1;
% ...
% Update handles structure
guidata(hObject, handles);
% Callback from element 2
% Choose default output
handles.output = hObject;
% ...
handles.myVariableCopy = handles.myVariable;
% ...
% Update handles structure
guidata(hObject, handles);
It is pretty easy actually. Hope it helps ;-) !
  3 commentaires
Cineva Slobozia
Cineva Slobozia le 25 Mai 2011
for 3rd question, the one that is the least important, i appreciate youre answer and it's good. i need answers for the others questions, though.
Matt Fig
Matt Fig le 27 Mai 2011
I answered your other question, but you deleted it...

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Migrate GUIDE Apps dans Help Center et File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by