>> A={1 2;2 3}
A =
[1] [2]
[2] [3]
>> A=[1 2;2 3]
A =
1 2
2 3
It seems to me they are essentially
Elements of different data types which get inside {}
become cells or elements of data type cell
. Elements inside []
retain their data type and make an array of that data type. Few examples below:
p = ['my', 'string'];
q = [int8(1), int8(2), int8(3)];
r = [0.11, 0.22, 0.33];
s = {'my', 'string'};
t = {1,2,3};
u = {0.11, 0.22, 0.33};
v = {int8(1), int8(2), int8(3)};
>> whos
Name Size Bytes Class Attributes
p 1x8 16 char
q 1x3 3 int8
r 1x3 24 double
s 1x2 240 cell
t 1x3 360 cell
u 1x3 360 cell
v 1x3 339 cell