>> x = { {'a',[1],[2]}; {'b',[3],[4]} }
x =
{1x3 cell}
{1x3 cell}
>> A1 = x(1)
A1 =
{1x3 cell}
>> A2 = x{1}
A2 =
'a' [1] [2]
Note that A1
and A2
display differently.
A1
and A2
report as being the same class and dimension:
>> info = @(x){class(x),size(x)};
>> info(A1)
ans =
'cell' [1x2 double]
>> info(A2)
ans =
'cell' [1x2 double]
yet they and are not considered equal:
>> isequal( A1, A2 )
ans =
0
However, A1{:}
is considered as being equal to A2
:
>> isequal( A1{:}, A2 )
ans =
1
Could someone explain what is going on here?