Problem with get matrix from one function buton to second.
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Brajan Nosal
le 10 Sep 2019
Réponse apportée : Bhargavi Maganuru
le 13 Sep 2019
Hello, i have a problem with get a matrix data which i created in one pushbutton. I need it in other pushbutton, but i dont know how corectly set "set" and "get" for cell...;/
i have cell in function pushbutton15_Callback name: tablicaRandLearnFull, value:70x5 double, and i need it in function pushbutton6_Callback,
if (handles.checkbox3.Value == 1.0)
P=[tablicaRandLearnFull(:,3)]
end
i get this error: "Undefined function or variable 'tablicaRandLearnFull'.",
when i put tablicaRandLearnFull(:,3) in command window i get data normally... Could u help me?
0 commentaires
Réponse acceptée
Bhargavi Maganuru
le 13 Sep 2019
You can access variables in another callbacks by saving the variables to handles structure, which is usually input to all callbacks.
To save tablicaRandLearnFull variable to handles, use
handles.tablicaRandLearnFull = tablicaRandLearnFull;
guidata(hObject, handles); %to update handles
Access handles in another callback using the following command
handles.tablicaRandLearnFull
Hope this helps!
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Logical dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!