This function has a large potential for improvements:
"var = eval(['cellArray{z,s}']);" could be replaced by the much faster and nicer "v = cellArray{z,s};".
"if size(var, 1) == 0" does not catch [1x0] arrays, while "isempty(v)" would.
Checking the success of FOPEN is strongly recommended to avoid a strange behaviour.
The documentation is sufficient and the function works as advertised.
Comment only