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

Read the error message. It tells you what the problem is. Did you check the class name?

댓글을 달려면 로그인하십시오.

 채택된 답변

추가 답변 (1개)

Karthik Bhogi
Karthik Bhogi 2020년 5월 3일
@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

you can also use 'single' or 'double' in place of 'unit8' to run your code without any errors.

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Logical에 대해 자세히 알아보기

태그

질문:

2017년 12월 18일

편집:

2020년 5월 3일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!