Error using zeros CLASSNAME input must be a valid numeric or logical class name.
显示 更早的评论
I try to draw line on image. in this code mat = zeros(250, 250, 'unit8'), they show this error Error using zeros CLASSNAME input must be a valid numeric or logical class name. I use matlab2017a.
1 个评论
Stephen23
2017-12-18
Read the error message. It tells you what the problem is. Did you check the class name?
采纳的回答
更多回答(1 个)
Karthik Bhogi
2020-5-3
0 个投票
@Joe Joe
in your code mat= zeros(250, 250, 'unit8')
please remove that unit 8 term and the code will run without any errors.
1 个评论
Karthik Bhogi
2020-5-3
编辑:Karthik Bhogi
2020-5-3
you can also use 'single' or 'double' in place of 'unit8' to run your code without any errors.
类别
在 帮助中心 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!