Date: Dec 5, 2012 8:02 AM
Author: Nasser Abbasi
Subject: why does a cell look different when it is a field in a struct?
Matlab 2012a
I am not good with cells. but this is strange:
---------------------
clear all;
A = {'A' 'a';'B' 'c'};
s = struct('data',{A(:,1)'});
------------------------
Now I typed:
-----------------
r1 = {A(:,1)'}
r2 = s.data
-----------------
Isn't the above 2 variable supposed to contain the same thing?
But see:
---------------------
r1 =
{1x2 cell}
r2 =
'A' 'B'
---------------------
I am confused now. Why are they different?
--Nasser