How do u check for the existence of a variable in base workspace from main GUI file?

3 次查看(过去 30 天)
How do u check for the existence of a variable in base workspace from main GUI file?

回答(1 个)

the cyclist
the cyclist 2013-4-25
编辑:the cyclist 2013-4-25
I am not very knowledgeable about GUIs, so there is almost certainly a better way, but one way to do this would be with the evalin() function. Specifically, I think you could check for the existence of the variable x with
>> tf = evalin('base','exist(''x'')')
Type
>> doc evalin
for details.

类别

Help CenterFile Exchange 中查找有关 Environment and Settings 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by