Borrar filtros
Borrar filtros

print acsii characters in tabular format using char

3 visualizaciones (últimos 30 días)
jarvan
jarvan el 11 de Nov. de 2014
Editada: pietro el 11 de Nov. de 2014
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?

Respuesta aceptada

pietro
pietro el 11 de Nov. de 2014
Editada: pietro el 11 de Nov. de 2014
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

Más respuestas (0)

Categorías

Más información sobre Workspace Variables and MAT-Files en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by