Difference Between a Number and Character Array

11 次查看(过去 30 天)
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 个评论
Stephen23
Stephen23 2015-2-12
编辑:Stephen23 2015-2-12
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

请先登录,再进行评论。

回答(1 个)

Evan
Evan 2015-2-12
编辑:Evan 2015-2-12
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.

类别

Help CenterFile Exchange 中查找有关 Matrices and Arrays 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by