passing variables between .m files using GUI
Afficher commentaires plus anciens
Hi there, i have a gui that contain some edit text and 2 push button. i used one push button(start) to execute an .m file (start.m) and fetch the value of edit text(epoch) and use it in some mathematical equations. for example :
epochs= str2double(get(handles.epoch,'String'));
y=epoch*2;
And i used another push button (test) to execute another .m file (test.m) .i want to use variable (y) in this new .m file but i have error (Undefined function or variable 'y'.).
I know it's a logical error, but i'm asking for a simple solution.
i tried make the .m files as functions. but also it gives me this error using first .m file (Undefined variable "handles" or class "handles.epoch".).
PLEASE i have to do my project in 2 days .
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Structures dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!