필터 지우기
필터 지우기

print acsii characters in tabular format using char

조회 수: 3 (최근 30일)
jarvan
jarvan 2014년 11월 11일
편집: pietro 2014년 11월 11일
I am writing a function that will receive a matrix of integers uint8 less than 129 as input agrument. And print it as acsii characters in tabular format using char
function mychar(y)
if y > 129
disp('Please enter less than 129.')
else
x = char(uint8(y))
table1 = uitable
set(table1,'Data',x)
end
However, it said data must be a numeric, logic. Is that any codes I missed on above?

채택된 답변

pietro
pietro 2014년 11월 11일
편집: pietro 2014년 11월 11일
try this:
function mychar(y)
if y > 129
disp('Please enter less than 129.')
else
x = char(uint8(y))
table1 = uitable
set(table1,'Data',{x})
end

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Workspace Variables and MAT-Files에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by