Problem with get matrix from one function buton to second.
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
Bhargavi Maganuru
2019-9-13
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 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!