Answer

clear;
%{
There is a built-in function called cellfun that evaluates a function for
every element of a cell array. Create a cell array, then call the cellfun function,
passing the handle of the length function and the cell array to determine the
length of every element in the cell array.
%}

% create a cell array
ca = cell(3,1);

ca{1} = 'hello world';
ca{2} = [17, 67];
ca{3} = false;
ca{4} = '123';

cellfun(@length, ca)
    


For more details, please contact me here.