matlab - MATLAB 编辑字段不接受打印值
问题描述
我尝试分配时显示错误...
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
错误显示在上述函数中标记为错误的注释行
白细胞计数
解决方案
错误是不言自明的:WBCCount
是一个句柄,app.WBC_Count
是一个双精度。
您正在尝试将 double 的值直接放置到WBCCount
,而不是设置 的相关属性WBCCount
。
如果app.WBCCount
是类matlab.ui.control.NumericEditField
使用:
app.WBCCount.Value = app.WBC_Count;
推荐阅读
- javascript - 这个javascript有问题吗?
- javascript - Highcharts 仪表图表大小
- database - 使用 go mongo 驱动程序设置默认查询超时
- .net - 使用托管客户端和实体框架连接到 LDAP Oracle 数据库
- python - 如何从互联网访问我的 EEL 应用程序?
- c# - 无法将 POST 请求正文中的 json 绑定到 .net-core 中的类参数
- asp.net-core - 将令牌传递给 .Netcore 中的 nswag apiclient
- amazon-web-services - 在 java 中将目标(LambdaFunction)添加到 AWS-CDK 中的事件规则时出现错误:堆栈中已经存在名称为 lambda_name 的构造
- c# - 带有 Xamarin SDK 许可协议的 Visual Studio
- javascript - React router dom - 表单 onSubmit 将输入值传递给另一个组件并重定向到该组件