Borrar filtros
Borrar filtros

Difference Between a Number and Character Array

2 visualizaciones (últimos 30 días)
Gabrielle Beckford
Gabrielle Beckford el 12 de Feb. de 2015
Editada: Stephen23 el 12 de Feb. de 2015
I have zero coding experience. What exactly is a character array, and how does it differ from a number array? I know in some code like the 'disp' function you use num2str[x] to convert a number array to a character array. What exactly is that doing? The entire concept confuses me.
  1 comentario
Stephen23
Stephen23 el 12 de Feb. de 2015
Editada: Stephen23 el 12 de Feb. de 2015
Whoever told you that you need to use num2str in order to display a numeric with disp is wrong:
>> disp([1,2,3])
1 2 3

Iniciar sesión para comentar.

Respuestas (1)

Evan
Evan el 12 de Feb. de 2015
Editada: Evan el 12 de Feb. de 2015
These links might be helpful for understanding data types in MATLAB, as well as classes in general:
The data type of a variable impacts its size, precision, possible values, and the operations that can be performed on it. Certain functions can only be performed on certain data types.

Categorías

Más información sobre Matrices and Arrays en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by