Date: Jan 17, 2013 5:36 PM Author: Bruno Luong Subject: Re: cell2mat with different data types and empty cells Few tips:
> c={uint8(8) pi []}
c =
[8] [3.1416] []
>> c(cellfun('isempty',c)) = {NaN} % Remove empty cells
c =
[8] [3.1416] [NaN]
>> [c{:}] % convert to lower class
ans =
8 3 0
>> cellfun(@double, c) % convert to specific class
ans =
8.0000 3.1416 NaN
% Bruno