Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有这个奇怪的问题。为了保存我的 gui 我需要的所有值,我使用结构。不好的部分是,如果我输入 S.var = 0,matlab 不会得到变量 var 为零,但它认为它是根对象!我怎样才能避免这种情况?我尝试谷歌搜索并在帮助文档中,但没有任何结果!
尝试使用false函数而不是仅仅分配 0... 所以:
false
S.var = false;
这将返回一个逻辑零,这应该是您想要的。