Function c_out = celllift(c)
c_out = celllift(c,opt)
lifts the contents of a single-element cell-array,
possibly recursively. E.g. for an input of {{"abc"}} we
will get the output "abc", and given {1,{{2,{{3}}}}} the
function will return {1,{2,3}}.
The input argument c may be a cell-array containing
possibly (recursively) nested cell-arrays. If something
else than a cell-array is input, the function will return
it unchanged.
Function celllift() does not call itself recursively.
The optional second argument opt is a struct. If its
field "flatten" is true (it is false at default), the
function does not lift but flattens the contents of input
argument c. In that case, the function behaves as m-file
cellflatten.m, except that cellflatten.m always returns a
cell-array.
The function internally calls the following non-standard
m-files:
-- cellget.m
-- cellset.m
-- displayf.m
(c) 2026 fabien van mook
2026.08.20 release of this file within package "fvm-celltravel" under GNU GPLv3+