필터 지우기
필터 지우기

How to check whether my input argument vector is in uint8 form or not?

조회 수: 2 (최근 30일)
Harsha Vemula
Harsha Vemula 2017년 5월 14일
답변: Walter Roberson 2017년 5월 14일
When I am writing the code for lzw algorithm.. It shows an error when I am checking whether my input argument vector is a uint8 or not?
Code:
function[output,table]=norm2lzw(vector,maxTableSize,restartable)
If ~isa(vector,'uint8')
Error('input argument must be a uint8 vector')
End
.................
Error is being shown here.!
Any help will be really handy :)

답변 (1개)

Walter Roberson
Walter Roberson 2017년 5월 14일
function [output, table] = norm2lzw(vector, maxTableSize, restartable)
if ~exist('vector', 'var') || ~isa(vector, 'uint8')
error('input argument must be a uint8 vector')
end

카테고리

Help CenterFile Exchange에서 Image Data에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by