【发布时间】:2020-02-16 04:27:43
【问题描述】:
我尝试分配时显示错误...
app.WBCCount = app.WBC_Count;
错误是...
设置类“zia”的属性“WBCCount”时出错: 无法将双精度值 76 转换为句柄
当我按下一个名为“countWBCButton”的按钮时,将调用一个函数。这是发生错误的函数...
% Button pushed function: CountWBCButton
function CountWBCButtonPushed(app, event)
if app.c ==1
app.WBCCount = app.WBC_Count; %Error Error Error Error.....
else
msgbox('First segment WBC','Error' , 'error');
end
end
错误显示在上述函数中的错误标记注释行
白细胞计数
【问题讨论】:
-
你能把你的 GUI 精简到最低限度,能够重现这个问题吗?在不知道
app.WBC_Count是什么以及如何设置app.WBCCount属性的情况下,很难回答。见How to create a Minimal, Reproducible Example。 -
@rinkert WBC_Count 是我的 Matlab 应用程序中的私有属性。整个项目中只赋值一次,即app.WBC_Count = cc.NumObjects;
-
请edit您的问题,并添加重现错误所需的最少代码。
-
@rinkert 我已经编辑了一点。看,或许能帮助你理解。
标签: matlab variable-assignment handle