【发布时间】:2017-07-25 13:01:36
【问题描述】:
您好,我是 MATLAB 的新手。
我有一个名为 predictLabels 的变量,它的值是 1、2、3、4。对于每个图像,predictLabels 的值都会发生变化。在工作区中,它显示为 predictLabels = '1' etc。
问题是,当我对该变量使用 if 条件时,什么也没有发生。下面给出的部分代码-
if predictLabels == 1
imshow(img);
end
上面的代码不起作用。没有错误显示,即使编译器也没有进入 if 语句。我认为这种条件检查有一个功能。
【问题讨论】:
标签: matlab variables if-statement