Do you want to convert the elements with number to true? Try this:
test(cellfun(@(x) ~isempty(x),test))={true}
Note that you can not directly assign logical value to the specified elements of cell.
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!