print acsii characters in tabular format using char

1 回表示 (過去 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 Center および File ExchangeEntering Commands についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by