Problem with get matrix from one function buton to second.
1 view (last 30 days)
Show older comments
Brajan Nosal
on 10 Sep 2019
Answered: Bhargavi Maganuru
on 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 Comments
Accepted Answer
Bhargavi Maganuru
on 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 Comments
More Answers (0)
See Also
Categories
Find more on Logical in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!